Re: Problem inserting data to SQL server 2K

From: Bernard (qbernard_at_hotmail.com.discuss)
Date: 10/11/04


Date: Mon, 11 Oct 2004 16:52:04 +0800

So you mean when this sp_insert_table will return 2 records
when calling from ASP but 1 record when using Query analyzer ?

hhmm..... but why ?

-- 
Regards,
Bernard Cheah
http://www.tryiis.com/
http://support.microsoft.com/
http://www.msmvps.com/bernard/
"Thoi Di" <thoidi8@yahoo.com> wrote in message
news:#KBxxxGrEHA.324@TK2MSFTNGP11.phx.gbl...
> 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!


Relevant Pages

  • Connection.Execute and SQL stored procedures
    ... ..asp, the connection object and MS SQL Server as the DB can help me out. ... Five of the six calls execute as expected. ... This particular stored procedure does quite a bit of work within the DB, ...
    (microsoft.public.sqlserver.odbc)
  • Re: Heres a rather broad question...
    ... I'm familiar enough with using ADO with VBScript/Javascript in ASP pages, ... authentication or permission issues with SQL Server 2000. ... IIS user doesn't have the proper permissions to access the database, ...
    (microsoft.public.data.ado)
  • Re: WAP, ASP engineer required - London
    ... > at the company I work for we need to hire in London a WAP ASP engineer ... > You should have experience of SQL Server database design and as ... online service development the ideal ... > candidate will be technically minded and have experience in SQL Server ...
    (microsoft.public.inetserver.asp.general)
  • Re: Need some fresh ideas
    ... I have an upload form that allows a user to browse and select ... asp server script validates the input ... SQL Server to it ... * editFile updates the form data. ...
    (comp.lang.javascript)
  • Re: Test Platform for ASP [newbie]
    ... need an add in such as sun ASP ONE server. ... > 6.0 which will be deployed on IIS & a MS SQL Server db. ... > waste time & petrol & give up on flexibility. ... > Do I need IIServer for this or is there an alternative? ...
    (microsoft.public.inetserver.asp.db)