Hi,
I am not sure if this type of question should be raised in this Newsgroup.
If not please direct me.
I am new to using RDO.Net data access but I thought I understood it. The 6
lines of code below is simply trying to load an empty table that has only
three columns. In the code I set the Name and Type fields. The third
column is a unique primary key set to Integer. I have set the Primary Key
to Identity with a seed of 1 and increment of one.
This code is being added to a Visual Basic.Net ASP.Web application under
Visual Studio.Net 2003. I was expecting the primary key to be automatically
initialize with the next unique value.
But I get the following error message:
Column 'ctlUnq' does not allow nulls.
I can easily manually add rows to this table via the SQL Server Enterprise
Manager. It automatically creates that primary key. In fact it will not
allow me to edit or initialize that primary key column. There is something
I do not understand. It sounds like a catch 22. I can't set the column but
I can't leave it null??
I would appreciate any direction.
************************************************
For Each iControl In Me.Controls(1).Controls
rRow = Me.DataSet31.Tables("tControls").NewRow()
rRow("ctlType") = iControl.GetType.Name
If iControl.ID = Nothing Then rRow("ctlName") = "Nothing" Else
rRow("ctlName") = iControl.ID
Me.DataSet31.Tables("tControls").Rows.Add(rRow)
Next
Thanks,
hugh