Re: Error reading recordset from DB2/AS400




"ShaggyMoose" <shaggymoose@xxxxxxxxx> wrote in message
news:1189524924.097769.245410@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Set adorecSet= _
adoConn.Execute("{Call libraryname.PR_TEST()}", ,adCmdText)

Thanks for you help. I tried the above, and it called the stored
procedure and returned a record set. However, there are two problems:

1. The cursor doesn't seem to know the record count (eg.
adoRecSet.RecordCount = -1).
2. I still get the same error message on the first adDBDate field when
the value is not NULL.

So, back where I started. Its very confusing to me that I am doing
basically the same thing via different methods, yet the result is
always different (well, broken in different ways).


Barrows is the man, but in case he doesn't get back here for a while, here
is something to chew on ...

1) A -1 for a RecordCount does mean the RecordCount is unknown. It isn't an
error. You can not receive a RecordCount for all cursors. But do you really
need one?

2) Dump the '*' for now and specifically request and return columns so you
can see what is happening. The error you are reporting is always related to
a confused query, taking it in smaller bits may help to isolate the exact
point of failure.

3) What are subsequent errors in the error collection, if any?

-ralph


.



Relevant Pages

  • Re: Any Recordset stays empty when using SQL Native Client
    ... Even the UDL Dialogue produces parameter names with spaces, ... Additionally I eliminated the "As New" declares. ... The problem is expecting the RecordCount to always 'work'. ... You need to use a client-side cursor, or a server-side with static, keyset, ...
    (microsoft.public.vb.database.ado)
  • Re: Help with IIS server Error (Provider error 80040154 Class not registered)
    ... Mr. Barrows ... page on my ISP's web server. ... > determines whether or not the cursor supports recordcount. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Please help with cmd.execute select SQL?
    ... > What is the proper format for my SQL str using command.execute? ... RecordCount requires the use of an expensive cursor. ... and connection immediately, releasing the connection back to the connection ...
    (microsoft.public.inetserver.asp.general)
  • Re: recordcount = -1 ??
    ... You don't need to use Recordcount, ... cursor, ... Looping through an array is much more efficient than looping through a ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: CursorLocation -> Scrollbar behavior
    ... OLEDB specification allows driver to return approximate RecordCount and ... MS Jet and Interbase (through OLEDB) ... or does is work with the SQL Server? ... I guess this has to do with the fact, that the ADO cursor have no clue ...
    (borland.public.delphi.database.ado)