fireballuk2001
IS-IT--Management
I have a form that posts a new "Tech Job" to a access database. This creates a new record in the database and has a autonumber field called ID. What i want to do is when a user enters their details, and the new record is created, and a ID number automatically generated by access, i want it to tell the user the "jobs ID number" so that they can search the db for their job to see its status based on their job id... heres part of my script............
<%@ LANGUAGE="VBSCRIPT"%>
<% 'on error resume next %>
<%
Function StrQuoteReplace(Value)
StrQuoteReplace = Replace(Value, "'", "''"
End Function
Dim name, location, computer, priority, details
Dim memberSQL , checkSet
' put the form content into variables
name = request("name"
location = request("location"
computer = request("computer"
priority = request("priority"
details = request("details"
%>
<!---#include file ="config-start.asp"--->
<%
jobSQL = "insert into jobs "
jobSQL = jobSQL & "(name, location, computer, priority, details)"
jobSQL = jobSQL & " values ('"&name&"', '"&location&"', '"&computer&"', '"&priority&"', '"& StrQuoteReplace(Details) &"')"
canvasDB.Execute(jobSQL)
%>
<html>
<head>
<title>newjob.asp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<% ' connect to database using our include file %>
<!---#inlclude file="config-end.asp"--->
<% if err.number = 0 then ' check to see if there were any errors%>
<B><CENTER>Job Details have been saved!</CENTER></B>
<%else%>
<center>
<B>Sorry there was a problem with your entry, Try again!</B>
<% end if%>
</html>
its very messy because im a beginner and this is my first site with asp. Ive got to do this cos its for my ICT Coursework (yea, im still at school doing A-levels in england
Please HELP!
<%@ LANGUAGE="VBSCRIPT"%>
<% 'on error resume next %>
<%
Function StrQuoteReplace(Value)
StrQuoteReplace = Replace(Value, "'", "''"
End Function
Dim name, location, computer, priority, details
Dim memberSQL , checkSet
' put the form content into variables
name = request("name"
location = request("location"
computer = request("computer"
priority = request("priority"
details = request("details"
%>
<!---#include file ="config-start.asp"--->
<%
jobSQL = "insert into jobs "
jobSQL = jobSQL & "(name, location, computer, priority, details)"
jobSQL = jobSQL & " values ('"&name&"', '"&location&"', '"&computer&"', '"&priority&"', '"& StrQuoteReplace(Details) &"')"
canvasDB.Execute(jobSQL)
%>
<html>
<head>
<title>newjob.asp</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<% ' connect to database using our include file %>
<!---#inlclude file="config-end.asp"--->
<% if err.number = 0 then ' check to see if there were any errors%>
<B><CENTER>Job Details have been saved!</CENTER></B>
<%else%>
<center>
<B>Sorry there was a problem with your entry, Try again!</B>
<% end if%>
</html>
its very messy because im a beginner and this is my first site with asp. Ive got to do this cos its for my ICT Coursework (yea, im still at school doing A-levels in england
Please HELP!