Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
I have been trying to debug above error to no avail.
Please tell me what is causing it.
Here is the code:
Language=VBScript%>
<%Response.buffer=true%>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<%
Set connectionToDatabase=Server.CreateObject("ADODB.Connection"
Set recordSet=Server.CreateObject("ADODB.Recordset"
connectionToDatabase.Open "DSN=sTract;UID=sokeh;PWD=sonn1e"
recordSet.Open "SELECT * FROM Driver",connectionToDatabase,1,3
Dim ss_nbr, fname, validate
validate=true
for each qryItem in Request.Form
if Request.Form(qryItem) = "" Then
validate = false
Response.Write("Missing : " & qryItem & "<BR>"
End if
next
if not validate then
Response.Write("<body bgcolor=steelblue><BR><font color=red><h3><b>" &_
"Please click the back button and complete the missing fields. " &_
"Thank You</b></h3></font></body> "
else
recordSet.AddNew
'recordSet("date" = date()
'recordSet("time" = Time()
recordSet("DriverID" = Request.Form("SS_NUM"
recordSet("fname" = Request.Form("FIRST_NAME"
recordSet("lname" = Request.Form("LAST_NAME"
recordSet("MI" = Request.Form("Middle_Initial"
recordSet("DriverSex" = Request.Form("DriveSex"
recordSet("Address1" = Request.Form("Address1"
recordSet("Address2" = Request.Form("Address2"
recordSet("CityAdd" = Request.Form("City"
recordSet("StateAdd" = Request.Form("STATE"
recordSet("ZipCode" = Request.Form("ZIP_CODE"
recordSet("PhoneHome" = Request.Form("Home_Phone"
recordSet("PhoneWork" = Request.Form("Work_Phone"
recordSet("EmailAdd" = Request.Form("Email_Address"
recordSet("atFault" = Request.Form("Fault"
recordSet("InfluenceType" = Request.Form("Influence_Type"
recordSet("InjuryType" = Request.Form("Injury_Type"
recordSet.Update
connectionToDatabase.Close
Set connectionToDatabase=Nothing
if Request.Form("CoApp" = "Yes" Then
Response.Redirect "co_applicant.asp?ss_nbr=" & Request.Form("SS_NUM"
else
Response.Redirect "new_applicant.asp"
end if
end if
%>
</body>
</html>
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
I have been trying to debug above error to no avail.
Please tell me what is causing it.
Here is the code:
Language=VBScript%>
<%Response.buffer=true%>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<%
Set connectionToDatabase=Server.CreateObject("ADODB.Connection"
Set recordSet=Server.CreateObject("ADODB.Recordset"
connectionToDatabase.Open "DSN=sTract;UID=sokeh;PWD=sonn1e"
recordSet.Open "SELECT * FROM Driver",connectionToDatabase,1,3
Dim ss_nbr, fname, validate
validate=true
for each qryItem in Request.Form
if Request.Form(qryItem) = "" Then
validate = false
Response.Write("Missing : " & qryItem & "<BR>"
End if
next
if not validate then
Response.Write("<body bgcolor=steelblue><BR><font color=red><h3><b>" &_
"Please click the back button and complete the missing fields. " &_
"Thank You</b></h3></font></body> "
else
recordSet.AddNew
'recordSet("date" = date()
'recordSet("time" = Time()
recordSet("DriverID" = Request.Form("SS_NUM"
recordSet("fname" = Request.Form("FIRST_NAME"
recordSet("lname" = Request.Form("LAST_NAME"
recordSet("MI" = Request.Form("Middle_Initial"
recordSet("DriverSex" = Request.Form("DriveSex"
recordSet("Address1" = Request.Form("Address1"
recordSet("Address2" = Request.Form("Address2"
recordSet("CityAdd" = Request.Form("City"
recordSet("StateAdd" = Request.Form("STATE"
recordSet("ZipCode" = Request.Form("ZIP_CODE"
recordSet("PhoneHome" = Request.Form("Home_Phone"
recordSet("PhoneWork" = Request.Form("Work_Phone"
recordSet("EmailAdd" = Request.Form("Email_Address"
recordSet("atFault" = Request.Form("Fault"
recordSet("InfluenceType" = Request.Form("Influence_Type"
recordSet("InjuryType" = Request.Form("Injury_Type"
recordSet.Update
connectionToDatabase.Close
Set connectionToDatabase=Nothing
if Request.Form("CoApp" = "Yes" Then
Response.Redirect "co_applicant.asp?ss_nbr=" & Request.Form("SS_NUM"
else
Response.Redirect "new_applicant.asp"
end if
end if
%>
</body>
</html>