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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting An Error Submitting Records

Status
Not open for further replies.

LongFeiFengWu

Technical User
Nov 9, 2001
98
US
This is the script:

<!--#Include file=&quot;../../Includes/OpenDBConnections.asp&quot; -->
<!--#Include file=&quot;../../Includes/UserInfo.asp&quot; -->
<%

Jurisdiction = request.form(&quot;Jurisdiction&quot;)

myNow = formatdatetime (DateAdd(&quot;h&quot;,1,Now),3)

SQL = &quot;SELECT count(*) as Num FROM unitDetails &quot;
SQL = SQL & &quot;WHERE ID=&quot; & request.form(&quot;Work&quot;)
objrec.open SQL,objcon,3,3

NumberOfRecords = objrec(&quot;Num&quot;)

objrec.close

SQL = &quot;SELECT * FROM unitDetails &quot;
SQL = SQL & &quot;WHERE ID=&quot; & request.form(&quot;Work&quot;)
If NumberOfRecords > 1 then SQL = SQL & &quot;AND Jurisdiction='&quot; & Jurisdiction & &quot;'&quot;

objrec.open SQL,objcon,3,3

units = objrec(&quot;units&quot;)
Type1 = objrec(&quot;Type1&quot;)
Type2 = objrec(&quot;Type2&quot;)

objrec.close

objrec.open &quot;orderTracking&quot;,objcon,3,3

objrec.addnew

objrec(&quot;Date&quot;) = Date
objrec(&quot;Time&quot;) = myNow
objrec(&quot;RepTPX&quot;) = TPX
objrec(&quot;SupTPX&quot;) = SupTPX
objrec(&quot;Type1&quot;) = Type1
objrec(&quot;Type2&quot;) = Type2
objrec(&quot;Units&quot;) = Units
objrec(&quot;TrackingNumber&quot;) = request.form(&quot;TrackingNumber&quot;)
objrec(&quot;TelephoneNumber&quot;) = request.form(&quot;TelephoneNumber&quot;)
objrec(&quot;Jurisdiction&quot;) = Jurisdiction
objrec(&quot;Sale&quot;) = request.form(&quot;Sale&quot;)

Objrec.update

%>
<script language=&quot;VBScript&quot;>

msgbox &quot;Your entry has been saved.&quot;
location.href = &quot;toolmidtop.asp&quot;

</script>

This is the error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]The request for procedure 'orderTracking' failed because 'orderTracking' is a table object.
/interactive/ecomm2/JobAids/Orders/toolmidtop_save.asp, line 29

Have been going 'round and 'round with this thing and can't find a reason why I would be getting that error. Any help will be greatly appreciated.

&quot;If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo.&quot; ~ Bruce Lee
 
I don't see the problem either, though I'm not sure which one is line 29. You could try forcing the open command to recognize the tablename as a table:
Code:
objrec.open &quot;orderTracking&quot;,objcon,3,3,2

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
minilogo.gif alt=tiernok.com
The never-completed website
 
Sorry, I should've mentioned line 29 is:

objrec.open &quot;orderTracking&quot;,objcon,3,3

Another wierd thing about this error is that it doesn't happen every single time the script is run. It's a random problem. Could it possibly be something I need to post in the SQL Server forum? Since that's what this application is being run on?


&quot;If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo.&quot; ~ Bruce Lee
 
That may be. Make sure you close all your open recordset objects before your script is finished and your setting all of the objects to nothing. It could be that the system isn't releasing the connection quickly enough. Although I have to admit you've actually managed to find an error i haven't seen a dozen times before (I thought I had run the error objects completely ragged :p).
But hey, that which doesn't kill us...

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
minilogo.gif alt=tiernok.com
The never-completed website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top