Forums
This topic is locked
Complicated Recordset Insert and Update - Impass
Posted 19 Dec 2002 20:07:37
1
has voted
19 Dec 2002 20:07:37 Jeff DeHaven posted:
Greetings All,I have a rather perplexing problem.
I have created a database (SQL 2K) That has a Customer Service table that relates to other tables with details about an incident or an order. This main Customer service table will use the Identifier or Primary Key of another table that contains an "incident" with text description.
So- what I need to do, and what I have working now is this:
Service rep logs in,
Service rep creates a new Customer service record (main table- CustSrvc) This table contains a contact name, date, etc.
After Service Rep submits form, the Recordset Insertion creates the data in the SQL database, the SQL database has an autonumber that I retreive on the same page as the Recordset insertion-- using the @@IDENTITY query and places that number into a session variable.
Then- the service rep could then create an "Incident" with text to explain the details of the incident. This is in another table (CustSrvcIncident). I have the same thing going on here- The recordset insertion page is the same page that stores that record number using @@IDENTITY into a session variable
So- now I have created a customer service record, and an incident and have a session variable for the Primary Key of each table. Now, what I have to do is place the Primary key of the Incident into the customer service record to tie the two together- Seems very simple - everything works up to this point, but on the page where I have created the recordset update to query the session variable of the Customer Service record and insert the session variable of the Incident ID I get an error that states:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ','.
/calllog/incidentpost.asp, line 111
Unfortunately line 111 is simply the MM Execute CMD line -- meaning the problem could be anywhere above that line in its subroutine. I have NOT hand coded any part of this particular page, and the datatypes are correct (numeric for numeric, text for text etc.). Basically, I have reached an impass and cannot figure out why this seemingly simple operation fails to function.
If anyone out there has any helpful insights- I would be most greatful!!
Replies
Replied 19 Dec 2002 23:49:24
19 Dec 2002 23:49:24 Owen Eastwick replied:
Post up the code for the stored procedure and the INSERT command.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Replied 20 Dec 2002 20:14:58
20 Dec 2002 20:14:58 Jeff DeHaven replied:
Thank you,
I recreated the page, and it works- apparently there was a discombobulated piece of code in my asp page that caused the error-- too bad it took me 2 days to do something so simple as this... And to think I used to work in tech support....
Thank your for offering to help, this is a great forum for professional web app designers!!
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Post up the code for the stored procedure and the INSERT command.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
I recreated the page, and it works- apparently there was a discombobulated piece of code in my asp page that caused the error-- too bad it took me 2 days to do something so simple as this... And to think I used to work in tech support....
Thank your for offering to help, this is a great forum for professional web app designers!!
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Post up the code for the stored procedure and the INSERT command.
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>