PRB: Error -2147217887 "No Error Description" When You Send SQL Text Field to Output Stream (297502)
The information in this article applies to:
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server 7.0
This article was previously published under Q297502 SYMPTOMS
When you use the Execute method of an ActiveX Data Objects (ADO) Command object with an option of adExecuteStream, if the CommandText of the Command object that selects a SQL Server Text field is longer than 1,024 characters, you receive the following error message:
Run-time error '-2147217887(80040e21):
No error description provided
No error is returned if there are 1,024 or fewer characters in the Text field. In addition, no error is returned if the field type is NText (which is tested up to 1,025,000 characters).
CAUSE
By default, the TEXTSIZE on the SQL Server side is set to 1,024 for the Output Stream.
RESOLUTION
There are two ways to resolve this problem:
- Use the Connection object that serves as the Command object's ActiveConnection to set the TEXTSIZE to a value that is high enough to accommodate the long Text field. You must set the TEXTSIZE before you call the Execute method of the Command object.
- Use a SQL NText field instead of a Text field.
| Modification Type: | Major | Last Reviewed: | 5/8/2003 |
|---|
| Keywords: | kbDatabase kbprb KB297502 kbAudDeveloper |
|---|
|