Re: Problem inserting data to SQL server 2K
From: Thoi Di (thoidi8_at_yahoo.com)
Date: 10/07/04
- Next message: Robbie: "IIS @ home"
- Previous message: doug: "IIS @ home"
- In reply to: Bernard: "Re: Problem inserting data to SQL server 2K"
- Next in thread: Bernard: "Re: Problem inserting data to SQL server 2K"
- Reply: Bernard: "Re: Problem inserting data to SQL server 2K"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 07 Oct 2004 05:52:02 -0700
Hi Bernard,
I forgot to mentioned in my previous thread. I did post it on the
ASPfee.com. And they told me to go to the SQL groups, and they said it's
a SQL server problem. I posted this problem to several groups as well.
Anyway, I personally thank you for your concern. I figured it out now.
Well, it's working. But I don't know how to explain it. if someone has a
similar problem, When an ASP page calls EXEC sp_insert_table, asking for
a IDENTITY value and SQL Server creates 2 recordsets. This is an
example:
- Combine all stored procedures into a gigantic one. Let SQL Server
handles all the work for you. Especially, SQL Server has to return the
IDENTIY value of the record that just created. In my case, I have table
tbl_request (PK is request_ID), after inserted a record then sends
request_ID to table tbl_Review for approvals, and then send request_ID
to tbl_worktime for how many days you've worked. And then, tbl_invoice
for whom you want to bill to.
- Add TRANSACTION within TRANSACTION and if something happens, you don't
have to go to the end of the process. Just do a ROLLBACK and terminate
the process.
- I got my problem solved.
That's all, folks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Robbie: "IIS @ home"
- Previous message: doug: "IIS @ home"
- In reply to: Bernard: "Re: Problem inserting data to SQL server 2K"
- Next in thread: Bernard: "Re: Problem inserting data to SQL server 2K"
- Reply: Bernard: "Re: Problem inserting data to SQL server 2K"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|