The solution to the problem that long text data cannot be retrieved from the Asp page
. When retrieving long text data from the record set in the Asp page, the following errors occur:
Microsoft OLE DB Provider for ODBC Drivers Error '80040e21'
Errors occurred
may include the following: Three solutions:
(1) Use rs.open sql,conn,1,3 to open the record set
(2) Put the column in the first column and take it out. For example, if there is a long text content in the comment, take the record set When entering the content, first use comment=rs("comment") to take out the troublesome thing and put it into a memory variable, and then operate other fields. Since the long text content is generally not displayed first, it is generally taken out and placed in a memory variable.
(3) Change to oledb mode to connect to the database. When connecting to the database in this way, this error will not occur (at least I have not encountered it). In my system, after changing the current OLEDB connection method to ODBC connection method, the error appeared immediately.
This error is suspected to be caused by some problems with the mechanism of Asp to retrieve data from the recordset returned by odbc. It is recommended to use the third method to avoid this error.