Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.NET and @@identity
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00666202
Message ID:
00668111
Views:
26
Bob,

Long time no see/hear...
Using your sql statement combined with executescalar of .NET sqlclient class
worked great.

Thanks,

>Try to send SET NOCOUNT ON INSERT .... SELECT scope_identity()
>
>BOb
>
>
>>.NET datatable doesn't return identity.
>>
>>ds=sqlData.runsql(strSql,"Dealer")
>>dt=ds.tables(0)
>>dim idx as integer = dt.rows(0)(0)
>>return idx
>>
>>idx is dbnull always with .NET
>>
>>If I run the query in Query Analyzer, I get the proper id# for my auto-increment primary key id field right after running an INSERT command.
>>
>>Does .NET dataset not support the @@identity?
>>
>>How would I get the last created id?
>>
>>Thanks,
Previous
Reply
Map
View

Click here to load this message in the networking platform