Re: Weird problem.



Well,
obviously (or perhaps not so) there is something wrong with your code. Also, I'm not familiar with "IDENT_CURRENT" - @@IDENTITY will do this for SQL Server. Do you want to post a short-but-complete code sample so that you can get some help?
Peter

"Tom P." <padilla.henry@xxxxxxxxx> wrote in message news:584d34a1-25ce-4de8-a78d-517e25d018ad@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a webpage that takes user data and sends it to a stored
procedure that inserts a row in a table then returns the ID of that
row for display.

The stored procedure does an insert then it uses IDENT_CURRENT to get
the identity of the row that was just inserted and selects the row
back out to display.

The dataset is not getting populated. The dataset has a DataTable that
gets created and the DataTable has the columns named correctly
according to the final select but there's no data in the table.

I've tried SET NOCOUNT ON, I've tried READ UNCOMMITTED, I've tried
COMMITing after the insert...

I've tried just limiting the data to return the ID and I'll do another
select later but I can't even get the ID out.

I just don't get it.

If anyone has any ideas please let me know. If there's anything else
you need to know just ask.

Tom P.

.



Relevant Pages

  • Data View and paging of results from SQL
    ... I'm trying to use the FrontPage Data View web part to show some ... any affect on my display. ... I'm using OLE DB to connect to my SQL Server. ... SELECT statement instead of a stored procedure, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Newbie question about Stored Procedures
    ... Deepak wrote: ... > You should handle the display of your data in your UI code. ... > such as stored procedure should just deliver the data. ... I'm just starting out on SQL server and stored procedures. ...
    (microsoft.public.sqlserver.programming)
  • Re: Weird problem.
    ... "Tom P." wrote in message ... The stored procedure does an insert then it uses IDENT_CURRENT to get ... back out to display. ... Mark Rae ...
    (microsoft.public.dotnet.framework.aspnet)
  • Return code not displaying
    ... On Sql Server 2000, I have a stored procedure that I am trying to get data ... return @lastIdentity ... Tom. ...
    (microsoft.public.sqlserver.programming)
  • Accessing ODBC tables in Access from SP
    ... Is there a way to set up a stored procedure to read from an ODBC access ... database directly into a new table in Sql Server 2000? ... Tom. ...
    (microsoft.public.sqlserver.programming)

Quantcast