P
Peter Row
Hi,
I am converted an existing vb6 web app to vb.net and have run into a bit of
a problem with data access via ADO.NET.
I am doing a full text search against a SQL Server 2000 DB, the SP that I
call to do this returns multiple resultsets, therefore
from the documentation I found that I would have to use the SqlDataReader in
order to move from one resultset to another.
However here lies the problem. After the SP is called in the vb6 version I
used the recordsets "RecordCount" method to
create a large enough array to do some additional processing (don't ask).
But I can no longer do this with the datareader because you
read one row at a time.
So my problem is how do I find out how many records are in the current
resultset when using a datareader?
As you can imagine the search SP is not trivial and repeating the query
twice just so I can find out the recordcounts
is not acceptable.
My first guess at a solution would be to use an ArrayList and then just call
it's .Add method then I wouldn't need to worry
about array size.
Any other suggestions welcome.
Regards,
Peter
I am converted an existing vb6 web app to vb.net and have run into a bit of
a problem with data access via ADO.NET.
I am doing a full text search against a SQL Server 2000 DB, the SP that I
call to do this returns multiple resultsets, therefore
from the documentation I found that I would have to use the SqlDataReader in
order to move from one resultset to another.
However here lies the problem. After the SP is called in the vb6 version I
used the recordsets "RecordCount" method to
create a large enough array to do some additional processing (don't ask).
But I can no longer do this with the datareader because you
read one row at a time.
So my problem is how do I find out how many records are in the current
resultset when using a datareader?
As you can imagine the search SP is not trivial and repeating the query
twice just so I can find out the recordcounts
is not acceptable.
My first guess at a solution would be to use an ArrayList and then just call
it's .Add method then I wouldn't need to worry
about array size.
Any other suggestions welcome.
Regards,
Peter