Visual Studio .NET - Urgent: How to Add Identity Col Value to DataRow
Asked By Karthik Bala
23-Jun-02 01:34 PM
DsAddressBook1 is the Dataset
The Table "Address_Lst" has an Identity Col "ADDRESS_ID "(seed)
Dim dt As DataTable = DsAddressBook1.Tables("Address_Lst")
Dim dr As DataRow = DsAddressBook1.ADDRESS_LST.NewRow
dr("FIRST_NM") = txtFirstName.Text.Trim
dr("LAST_NM") = txtLastName.Text.Trim
DsAddressBook1.ADDRESS_LST.AddADDRESS_LSTRow(dr)
DAAddressUSA.UpdateCommand = Me.SqlInsertCommand1()
The Above Code not working.
It says
Exception Details: System.Data.NoNullAllowedException: Column 'ADDRESS_ID' does not allow nulls.
I would be appreicated any one give a solution to insert Identity column value to the Table
Note: I have used DataAdapter in Design time and used "Configure DataAdapter". The select,insert and update commands generated automatically.
Karthik Bala
Is this with MS Access or SQL Server?
See here for answer--
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconretrievingidentityorautonumbervalues.asp
(Watch any wrapping of URI)
visual studio.net 2003 and Access 2007 database .NET Framework Hi I am currently using Visual Studio.Net 2003 running on Windows Server 2000 operating system. I have used Visual Studio.net 2003 connecting to Access 2002 databases in the pass with great success. Now
Visual Studio .net .NET Framework Hi NG, ich habe vor längerer Zeit mit Visual Studio .Net 2003 gearbeitet und überlege momentan auf einen neueren Stand upzudaten. Ein Visual Studio .Net 2008 scheint es nicht zu geben. Habe zumindest mit googeln nichts gefunden. Was
Wise for Visual Studio.NET Wise for Visual Studio.NET By Peter A. Bromberg, Ph.D. To "Print This Page" Link Peter Bromberg Wise for Visual Studio .NET is a total and complete installation development system for creating and editing Windows® Installer
Visual Studio versioning . . . . how to tell? .NET Framework To my knowledge, Visual studio 6 was released in 1998, then Visual Studio .NET 2002 is VS 7, then Visual Studio .NET 2003 is VS 7.1, then Visual
Is Visual Studio self-hosting ? .NET Framework Does Microsoft use Visual Studio IDE, Visual Studio Debugger, Visual Studio Linker and Visual Studio compiler for developing Visual Studio ? Or is Visual Studio not