getting a latest value that was inserted into a database.
-
Hello, I have a table with the primary key being a auto incremented value (IDNumber). I need to retrieve the latest value that was inserted into the database. So if the latest IDNumber is 100, I have to somehow pull this number from the database, so I can use it in my program. The main problem is, if the program is first started I need to get this value. I am using VS 2005 and SQL server 2005. Is there a simple way to do this. Thanks in advance, Steve
-
Hello, I have a table with the primary key being a auto incremented value (IDNumber). I need to retrieve the latest value that was inserted into the database. So if the latest IDNumber is 100, I have to somehow pull this number from the database, so I can use it in my program. The main problem is, if the program is first started I need to get this value. I am using VS 2005 and SQL server 2005. Is there a simple way to do this. Thanks in advance, Steve
-
Hello, I have a table with the primary key being a auto incremented value (IDNumber). I need to retrieve the latest value that was inserted into the database. So if the latest IDNumber is 100, I have to somehow pull this number from the database, so I can use it in my program. The main problem is, if the program is first started I need to get this value. I am using VS 2005 and SQL server 2005. Is there a simple way to do this. Thanks in advance, Steve