recordset.getstring() in ado.net?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello, i need to know if there are some way of getting the ado method
recordset.getstring(), in the ado.net...


thanks!!!
 
DataAdapter.Fill

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Rothariger,

No, because there is no way to get a recordset in ADONET and therefore as
well not a string from it.

The most nearest equivalent of a recordset is a datatable. That you can get
as Bill mentioned with a DataAdapter.Fill, however the datatable are
collections of objects, not values, therefore AFAIK have you to build your
own string or collection of those.

I hope this gives an idea

Cor
 
thanks for the response, but i didnt ask that...

i know all the data schema...

supose i have a ado recordset with 3 "columns"...

name lastname phone
john doe 11111111
phill smith 22222222

in ado, you could make recordset.getstring vbtab, vbcrlf and youll get...
"john -> doe -> 111111111" vbcrlf "phill -> smith -> 2222222"

i want to know if in ado.net is something like that....
 
Rothariger,

You could use a DataReader object to come close to what you need below.
The only difference will be that you will be responsible for concatenating
the column values yourself rather than have one fuction that does it for
you.
In such concatenation use StringBuilder rather than System.String.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top