srobia
asked on
ASP.NET/ ADO.NET Access 97 Autonumber
Hi,
I have an access 97 database that I am writing data to through .NET. The table I'm inserting data into has an autonumber column for the primary key. I need to have that primary key return to the .NET layer so I can do other things with it. I have done my insert through a straight SQL call, and through a DataAdapter -- they both work fine. However, I cannot get the Primary Key returned. I found out that you cannot do a "Select @@IDENTITY" because it is Access 97. How can I get the primary key for an newly inserted row effectively?
Thanks
I have an access 97 database that I am writing data to through .NET. The table I'm inserting data into has an autonumber column for the primary key. I need to have that primary key return to the .NET layer so I can do other things with it. I have done my insert through a straight SQL call, and through a DataAdapter -- they both work fine. However, I cannot get the Primary Key returned. I found out that you cannot do a "Select @@IDENTITY" because it is Access 97. How can I get the primary key for an newly inserted row effectively?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.