datareader and mssql text datatype

  • Thread starter Thread starter Jim McCarthy
  • Start date Start date
J

Jim McCarthy

Hello

I'm having trouble using a datareader to retrieve mssql text datatype
fields. I can find examples where images are the data stored in the field
but the fields I need to work with have text in them. Can anyone point me to
some sample code.

Thanks,
Jim
 
Jim,

How are you trying to access it? The DataAdapter in the SqlClient
namespace should translate that into a string instance for you.
 
I'm trying to use a datareader instead of a dataadapter and dataset. I'm
using so many dataadapters and datasets right now I was just trying to avoid
using another.



Another question -- do I need to use another dataset for each dataadapter I
use in a form or for that matter in my application.

Thanks,

Jim

Nicholas Paldino said:
Jim,

How are you trying to access it? The DataAdapter in the SqlClient
namespace should translate that into a string instance for you.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jim McCarthy said:
Hello

I'm having trouble using a datareader to retrieve mssql text datatype
fields. I can find examples where images are the data stored in the field
but the fields I need to work with have text in them. Can anyone point me
to
some sample code.

Thanks,
Jim
 
I'm trying to use a datareader instead of a dataadapter and dataset. I'm
using so many dataadapters and datasets right now I was just trying to avoid
using another.



Another question -- do I need to use another dataset for each dataadapter I
use in a form or for that matter in my application.

Thanks,

Jim

Jim,

You can fill one DataSet from all of the DataAdapters, but that might not be
what you want. I would look at all of the DataAdapters and categorize their
use. Then I would fill DataSets that match the groups.

For instance if you have a lot of ListBoxes or DropDowns to populate, then a
DataSet filled by DataAdapters that only have Select Commands would be
appropriate.

Nicholas Paldino said:
Jim,

How are you trying to access it? The DataAdapter in the SqlClient
namespace should translate that into a string instance for you.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jim McCarthy said:
Hello

I'm having trouble using a datareader to retrieve mssql text datatype
fields. I can find examples where images are the data stored in the field
but the fields I need to work with have text in them. Can anyone point me
to
some sample code.

Thanks,
Jim

Otis Mukinfus
http://www.otismukinfus.com
 
Back
Top