Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

errors

Status
Not open for further replies.

vlitim

Programmer
Sep 2, 2000
393
GB
does anyone know what the below error actually means!

Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

 
Sounds like there is a problem with your database drivers. Maybe you should upgrade your Microsoft Data Access Components
Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
I only seem to get this error while trying to output a text datatype field from SQL, it seems to work for all other types!
 
You can get this error for a number of reasons.

The first is that you are trying to update a clientside recordset (.cursorLocation = adUseClient).

Another reason you will get this error, is as you said when you try to access a TEXT column in SQL server or a LONG, RAW or LONG RAW column in Oracle.

The solutions is to use the getChunk() method of the recordset.

Code:
variable = rs("field").getChunk(rs("field").actualsize)
should do the trick

To update TEXT/Memo/LONG/RAW/LONG RAW fields and the like you need to use AppendChunk()

Hope that helps
 
When I use your code, I got this error:

ADODB.Field (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

any ideas?
 
First, a quick correction.. It should be
Code:
(rs("field").Actualsize +1)

That still won't fix your problem though...

You have opened the recordset in a mode where actualsize doesn't work..

Try adOpenStatic, adLockReadonly

More than likely if you print the value of .Actualsize it will be -1 which will result in your error message (because getChunk can't get a chunk -1 (or zero if you applied above fix) in size)

I tested the following and it worked (this was in Oracle 8):

AT SQL Prompt:
conn scott/tiger@test
create table T(L Long);
insert into T values ('12345');
commit;

<!--ASP PAGE-->
<%
set db = server.createobject(&quot;ADODB.connection&quot;)
set rs = server.createobject(&quot;ADODB.recordset&quot;)

sql = &quot;select * from T&quot;

db.open &quot;dsn=test;uid=scott;pwd=tiger&quot;
rs.open sql, db
response.write rs(&quot;L&quot;).getChunk(rs(&quot;L&quot;).actualsize+1)
rs.close
db.close
%>
The script output was: 12345
which is to be expected.

Hope that helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top