473,395 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

VB.NET 2005 SQL 2005 return ID after insert statement

Hello,

how do I insert a new row in a table and get the auto-number field value
back from the database (sql)? I don't have any experience with Stored
Procedures.The next thing I want to do is using a TimeStamp field to check
for concurrency. What would be the best way to do this?

My idea is like this:
1. insert new row into table in dataset.
2. update this change to the database.
3. receive the autonumber field and the timestamp value back from database.
4. reload these returned value into row in dataset.

So when a change is done to this row I know the ID and the TimeStamp value
to check if someone changed the row.

I hope someone knows where to find an example in which this is explained or
can tell me how to accomplish this.
Thx!

Dec 23 '05 #1
0 1247

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject...
2
by: R.A.M. | last post by:
Hello, I am learning SQL Server 2005. I need to create a trigger which increments number of book's publications: CREATE TRIGGER InsertPublication ON Publications AFTER INSERT AS BEGIN
6
by: Ryan | last post by:
I have 2 Access '97 databases. I am trying to migrate all the data from one to the other (append to existing records). I do not have Access '97 and opening with Access XP or later causes...
1
by: Stout | last post by:
Is it possible to create a trigger in one database, that after an insert, will update a database on a different server? If so, how would I do this? Thanks. Bill
2
by: sangam56 | last post by:
Greetings. I suppose people out there can help in my problem. I am using sql server of microsoft visual studio 2005 itself. I have created a stored procedure which is give below. It works fine but...
1
by: ravysters | last post by:
hi... i am using VC++ to connect to my database and i am trying to insert a new row into a table. I am also using the returning statement available in postgres to return a column of the currently...
1
by: M | last post by:
I have the some troubles. I have a VBNET Project version 7.0.9466. Microsoft Visual Basic .NET 55524-640-2187145-18548 I have SQL 2005 and SQL 2000 in different remote computers. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.