FIX: You cannot insert empty string into Memo, Text, nText, or Blob columns (316323)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Basic .NET (2002)
This article was previously published under Q316323 This article refers to the following Microsoft .NET
Framework Class Library namespace:
SYMPTOMS When you try to insert an empty string into Memo, Text,
nText or Blob columns by using the OLE DB .NET data provider, you receive the
following exception: An unhandled exception of type
'System.InvalidOperationException' occurred in system.data.dll If
you handle this exception within a try-catch block, you receive the following information:
System.InvalidOperationException
System.Data.OleDb.OleDbException: Multiple-Step OLE DB operation generated
errors. Check each OLE DB status value, if available. No work was done.
RESOLUTION To work around this problem:
- For strings, insert a space that has a length greater than
zero (such as " "), instead of using an empty string.
- If the database has an Allow Nulls setting, select Allow Nulls for the columns in the database, and treat nulls as empty
strings.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug was
corrected in Microsoft ADO.NET (included with the .NET Framework 1.1), and
Microsoft Visual Basic .NET (2003).
REFERENCES For more information about ADO.NET objects and syntax, see
the following Microsoft .NET Framework SDK documentation: For additional information about ADO.NET, click the article
number below to view the article in the Microsoft Knowledge Base: 313590 INFO: Roadmap for ADO.NET
Modification Type: | Minor | Last Reviewed: | 9/15/2005 |
---|
Keywords: | kbvs2002sp1sweep kbfix kbbug kbSystemData KB316323 |
---|
|