Re: Weird problem.
- From: "Peter Bromberg [C# MVP]" <pbromberg@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 20 Sep 2008 21:55:28 -0400
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.
.
- Follow-Ups:
- Re: Weird problem.
- From: Mark Rae [MVP]
- Re: Weird problem.
- References:
- Weird problem.
- From: Tom P.
- Weird problem.
- Prev by Date: Re: SessionID
- Next by Date: Re: Looking for an open source File Manager asp.net control
- Previous by thread: Weird problem.
- Next by thread: Re: Weird problem.
- Index(es):
Relevant Pages
|