I'm using C++ and ADO to add data to a SQL Server 2005 database. When calling the Recordset Update method for a sql_variant column I'm getting the error DB_E_ERRORSOCCURRED
and the error message Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
If the value I'm adding is NULL all works fine and all values going to the fields that are not sql_variant types work.
Does anyone know what I might be doing wrong?
Thanks
[Edit] I have some more information. The value we are storing is the empty string - ADO appears to want to store this in the sql_variant as a nchar(0), which of course is not a valid SQL data type. Is there a way to get an empty string in a sql_variant using the ADO batch commands?