Chris
Ok here is what I have:-
objAdapter = New SqlDataAdapter("SET IDENTITY_INSERT tblScreens ON;
SELECT * FROM tblScreens WHERE 1 = 2 ", cnMainLocal)
objAdapter.Fill(objDSDBTable, tablename)
For Each objDataRow In dsSource.Tables(0).Rows
With dsDest.Tables(0)
objDBRow = .NewRow()
For Each c In .Columns
objDBRow(c.ColumnName) = objDataRow(c.ColumnName)
Next
.Rows.Add(objDBRow)
End With
ObjCmdBuilder = New SqlCommandBuilder(objAdapter)
objAdapter.Update(dsDest, tablename)
Next
However I get the following error message when i perform the
objAdapter.Update(objDSDBTable, tablename):-
Explicit value must be specified for identity column in table
'tblScreens' when IDENTITY_INSERT is set to ON
This means that the columns need to be Explicitly defined but the update
does not appear to send the column names.
Can you provide further information?
Many thanks
Rippo
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!