473,386 Members | 1,786 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,386 software developers and data experts.

When you inserting data using SqlCommandBuilder...

is there a way to retrieve the value of an autoincrement column inserted in
the database?
Nov 17 '05 #1
1 1498
Select @@Identity right after the insert. You will get the autoincrement
value.
"Rico Alexander" <ra******@ucla.edu> wrote in message
news:OX**************@TK2MSFTNGP12.phx.gbl...
is there a way to retrieve the value of an autoincrement column inserted in the database?

Nov 17 '05 #2

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

Similar topics

2
by: ¹ùÑÇ·æ | last post by:
first of all ,i will thank you for reading this . :-) i am writing a programming to access SQL-SERVER. i use some codes as follows in order to update data changed in datagrid1. but i found that...
1
by: ad | last post by:
I have a dataset with a datatable, which data is select from to table like SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductID, Products.ProductName FROM ...
2
by: sweetness | last post by:
I'm new to this and desperately need help, I'm trying to insert into an sql db and i have no idea what to do and why. i created an sqladapter, and an sqlconnection by dragging and dropping. this...
6
by: Ivan Weiss | last post by:
Another question for the whizzes out there. I have the following code in a database class: Public Sub insertData(ByVal argInsertSql As String, ByVal argTable As String) Dim myConnection As New...
3
by: Curt Emich | last post by:
Can someone tell me specifically what's missing in this code so that it won't write the record into the database? Please, no references to lengthy, bloated, meandering articles telling me how to...
15
by: Marcus | last post by:
I created a VB.Net 1.1 application that iterates through all the tables in any basic Access 2000 database passed to it and generates the same table structure in a SQL Server Express database. The...
1
by: TonyJ | last post by:
Hello! I trying to update a table using sql server but no update will be done. I don't get any error at all. Here is an extract from the code. Does this seems to be right.
1
by: gomathinayagam | last post by:
hai, am only beginer in c#... i am trying to connect database with webform. using a technique that the fields of the table and the controls in a form are named same...then i try get the controls...
2
by: ashish1985s | last post by:
using System.IO; using System.Data; using System.Collections; using System.Configuration; using System.Xml; using System.Data.SqlClient; using System; using log4net; using log4net.Config;
4
by: MissElegant | last post by:
Hi all, I have tried to do a test to a lesson which was in the internet, but it doesn't work? ANYBody here to help please?? The problem that what I enter in the textbox should be sent to the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.