Newbie: SQL string construction

S

steve

Hello,

i would appreciate any suggestions for the following:

I need to construct a string at runtime which will get the data.
I *only* want to read and store the data, no update/delete.

If I use a datareader how will I display them and consequently store them in
an array?
for example, if I use a textbox or listview I dont know the number of
columns beforehand.
Will a dataset be a better choice?
I dont need to worry about memory limitations and/or access time. its a
small project.What is important is the ease of displaying and storing the
data for later processing (statistics, export to excel, etc.)


TIA
-steve
 
C

Cor Ligthert

Steve,

At this moment with the Net 1.1 listview, it is one of the rare occasions
where I advice the datareader. (I assume as well that you mean with update
as well not adding new records to the database and even than I advise the
datareader and an "insert" with a commandnonquerry).

The datareader can be used to directly in its loop to fill the listview.

When you want to do something more with the data, than just do not use that
listview because only the first column (item) is editable and go for the
datagrid.

I hope this helps?

Cor
 

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

Top