Thursday, March 8, 2012

2147217887 Error when sending to SQL 2005

I have a Visual Basic 6.0 app that I developed initially using MS SQL Server
7, then MS SQL
Server 2000 and now MS SQL Server 2005. I seem to get this error more often
in 2005 that the older versions. Googling does not seem to give any help.
What are the causes of this error? What can I do to avoid it?
The error happens when I use a command like:
DataRecord3.Fields("PSI_Fifteen") = CStr(PSI_Fifteen)
If I resend the command after the error it always works.
Thanks,
Bob HillerBob and Sharon Hiller (aoklans@.tir.com) writes:
> I have a Visual Basic 6.0 app that I developed initially using MS SQL
> Server 7, then MS SQL Server 2000 and now MS SQL Server 2005. I seem to
> get this error more often in 2005 that the older versions. Googling does
> not seem to give any help. What are the causes of this error? What can I
> do to avoid it?
> The error happens when I use a command like:
> DataRecord3.Fields("PSI_Fifteen") = CStr(PSI_Fifteen)
> If I resend the command after the error it always works.
That seems to be very informative message "Multiple-step OLE DB operation ge
nerated errors. Check each OLE DB status value, if available. No work was do
ne."
That is, there are several possible reasons for the error, or more
exactly, it can be about anything.
One problem may be that the input data is too long for the field. Another
might that there is no metadata available to make it possible to assign
the field a value. The fact that you say that you get this more often
with SQL 2005 indicates this. See
http://lab.msdn.microsoft.com/produ...59-17b0073cfa26
for such a case.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

No comments:

Post a Comment