trouffiondesiles
unread,Nov 9, 2009, 7:59:59 AM11/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
HI,
I have a problem when i add a row to my slq Server Database.
There is how i add this row :
DB.getSqlDataSet(RequeteAll, DataSetAll,
TableName)
Dim Primary_Key_Columns(0) As DataColumn
Primary_Key_Columns(0) = DataSetAll.Tables
(TableName).Columns("PKPlanning")
DataSetAll.Tables(TableName).PrimaryKey =
Primary_Key_Columns
ObjDataRow = DataSetAll.Tables(TableName).NewRow
'PrimaryKey = DB.GetNewPrimaryKey(DataSetAll,
"PKPlanning", TableName)
'ObjDataRow("PKPlanning") = 50
ObjDataRow("PKUser") = Item.PKUser
ObjDataRow("PKMonth") = Item.PKMonth
ObjDataRow("PlanningDay") = Item.PlanningDay
ObjDataRow("PKHoraire") = Item.PKHoraire
DataSetAll.Tables(TableName).Rows.Add(ObjDataRow)
On the row.add i have an error that PKPlanning can't obtain a NULL
result.
The Colums PKPLanning is configured into PrimaryKey with
autoincrement.
Have somebody an answer for my problem??
(Sorry for my english i'm french...)
Bye, Nicolas.