scott_mccain
April 4th, 2003, 08:05 PM
I am using a sql2k database that was designed with a field that is composed of the uniqueidentifier data type. My problem is assigning the guid value to a recordset field during immediate mode updates. I have included some sample code below. Right at the assignment of the "AppID" field it throws an exception. The error message is "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.", and the error code is -2147217887.
Here is the code I am using:
Dim g As Guid = Guid.NewGuid()
dim oRS As New ADODB.Recordset()
oRS.Open("MyTable", oConn, 2, 2)
oRS.AddNew()
oRS("AppID").Value = g 'this line throws the error, this is the uniqueidentifier field
oRS.Update()
oRS.Close()
Thanks for any help.
Here is the code I am using:
Dim g As Guid = Guid.NewGuid()
dim oRS As New ADODB.Recordset()
oRS.Open("MyTable", oConn, 2, 2)
oRS.AddNew()
oRS("AppID").Value = g 'this line throws the error, this is the uniqueidentifier field
oRS.Update()
oRS.Close()
Thanks for any help.