Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can you help me debug this, please

Status
Not open for further replies.

chidi

Technical User
Mar 24, 2003
42
0
0
NG
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(&quot;ADODB.Connection&quot;)
Set recordSet=Server.CreateObject(&quot;ADODB.Recordset&quot;)
connectionToDatabase.Open &quot;DSN=sTract;UID=sokeh;PWD=sonn1e&quot;


recordSet.Open &quot;SELECT * FROM Driver&quot;,connectionToDatabase,1,3

Dim ss_nbr, fname, validate
validate=true

for each qryItem in Request.Form
if Request.Form(qryItem) = &quot;&quot; Then
validate = false
Response.Write(&quot;Missing : &quot; & qryItem & &quot;<BR>&quot;)
End if
next

if not validate then
Response.Write(&quot;<body bgcolor=steelblue><BR><font color=red><h3><b>&quot; &_
&quot;Please click the back button and complete the missing fields. &quot; &_
&quot;Thank You</b></h3></font></body> &quot;)
else

recordSet.AddNew
'recordSet(&quot;date&quot;) = date()
'recordSet(&quot;time&quot;) = Time()

recordSet(&quot;DriverID&quot;) = Request.Form(&quot;SS_NUM&quot;)
recordSet(&quot;fname&quot;) = Request.Form(&quot;FIRST_NAME&quot;)
recordSet(&quot;lname&quot;) = Request.Form(&quot;LAST_NAME&quot;)
recordSet(&quot;MI&quot;) = Request.Form(&quot;Middle_Initial&quot;)
recordSet(&quot;DriverSex&quot;) = Request.Form(&quot;DriveSex&quot;)
recordSet(&quot;Address1&quot;) = Request.Form(&quot;Address1&quot;)
recordSet(&quot;Address2&quot;) = Request.Form(&quot;Address2&quot;)
recordSet(&quot;CityAdd&quot;) = Request.Form(&quot;City&quot;)
recordSet(&quot;StateAdd&quot;) = Request.Form(&quot;STATE&quot;)
recordSet(&quot;ZipCode&quot;) = Request.Form(&quot;ZIP_CODE&quot;)
recordSet(&quot;PhoneHome&quot;) = Request.Form(&quot;Home_Phone&quot;)
recordSet(&quot;PhoneWork&quot;) = Request.Form(&quot;Work_Phone&quot;)
recordSet(&quot;EmailAdd&quot;) = Request.Form(&quot;Email_Address&quot;)
recordSet(&quot;atFault&quot;) = Request.Form(&quot;Fault&quot;)
recordSet(&quot;InfluenceType&quot;) = Request.Form(&quot;Influence_Type&quot;)
recordSet(&quot;InjuryType&quot;) = Request.Form(&quot;Injury_Type&quot;)
recordSet.Update


connectionToDatabase.Close
Set connectionToDatabase=Nothing

if Request.Form(&quot;CoApp&quot;) = &quot;Yes&quot; Then
Response.Redirect &quot;co_applicant.asp?ss_nbr=&quot; & Request.Form(&quot;SS_NUM&quot;)
else
Response.Redirect &quot;new_applicant.asp&quot;
end if


end if
%>


</body>
</html>
 
here is the MS explanation for your error

This error is caused when you try to insert too much data into a specified field. For example if you enter a string that is 20 characters long into a field that is defined as varChar(10), or if you try to insert a value greater than 215 (approx 2.1 billion) into an Integer field.


on that I would start by checking the settings in the table. see if you are exceeding any of them.
admin@onpntwebdesigns.com
 
You guys are so good.
I love this forum.
I just came back to say I found the problem which was exactly what you pasted onpnt.
I was inserting an nvarhar into an integer column.
It is all fixed now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top