T
tarscher
Hi all,
I have a database layer (DataSet) I use to attach my controls to. The
dataset is generated via the wizard. I want to know how I can get the
las inserted id I did with one of the queries I defined in that
databaselayer. I know of both @@IDENTITY and scope_identity() but I
can't get the id from that query.
I try:
int lastId = Convert.ToInt16(myDataSetTableAdaptor.GetLastIDQuery());
where GetLastIDQuery() is the query that returns the last id ("SELECT
SCOPE_IDENTITY()") .
All help is greatly appreciated
Regards,
Stijn
I have a database layer (DataSet) I use to attach my controls to. The
dataset is generated via the wizard. I want to know how I can get the
las inserted id I did with one of the queries I defined in that
databaselayer. I know of both @@IDENTITY and scope_identity() but I
can't get the id from that query.
I try:
int lastId = Convert.ToInt16(myDataSetTableAdaptor.GetLastIDQuery());
where GetLastIDQuery() is the query that returns the last id ("SELECT
SCOPE_IDENTITY()") .
All help is greatly appreciated
Regards,
Stijn