By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,361 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

How display Result from sqlCommand select in the Datagridview

P: n/a
Hi all

How can I display the result of a sqlcommand select in a datagridview.

I guess need a dataset as result to connet it as datasource to the
datagrid?
Thanks in advance

Manfred
Mar 23 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Manfred,

Yes, in fact the most simple a datatable.

Use a sqldataadapter to fill that dataset

Cor

"Manfred" <mm*@USENEThsk.ch> schreef in bericht
news:ux**************@TK2MSFTNGP10.phx.gbl...
Hi all

How can I display the result of a sqlcommand select in a datagridview.

I guess need a dataset as result to connet it as datasource to the
datagrid?
Thanks in advance

Manfred

Mar 23 '06 #2

P: n/a
How can I get the data from the datareader object into the datatable? As
I assume the only way to retrieve the data from the command object is
the datareader Object, is this right? I'm new to vb.net.

regards

Manfred

Cor Ligthert [MVP] wrote:
Manfred,

Yes, in fact the most simple a datatable.

Use a sqldataadapter to fill that dataset

Cor

"Manfred" <mm*@USENEThsk.ch> schreef in bericht
news:ux**************@TK2MSFTNGP10.phx.gbl...
Hi all

How can I display the result of a sqlcommand select in a datagridview.

I guess need a dataset as result to connet it as datasource to the
datagrid?
Thanks in advance

Manfred



Mar 23 '06 #3

P: n/a
Manfred,

The datareader you would only use if you have to do things sequential.

For normal fetching of data you use in Net the DataAdapter, or the
TableAdapter.

The TableAdapter wraps the DataAdapter.
The DataAdapter wraps for getting the data the DataReader

http://msdn2.microsoft.com/en-us/lib...taadapter.aspx

I hope this gives some ideas

Cor
"Manfred" <mm*@USENEThsk.ch> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
How can I get the data from the datareader object into the datatable? As
I assume the only way to retrieve the data from the command object is
the datareader Object, is this right? I'm new to vb.net.

regards

Manfred

Cor Ligthert [MVP] wrote:
Manfred,

Yes, in fact the most simple a datatable.

Use a sqldataadapter to fill that dataset

Cor

"Manfred" <mm*@USENEThsk.ch> schreef in bericht
news:ux**************@TK2MSFTNGP10.phx.gbl...
> Hi all
>
> How can I display the result of a sqlcommand select in a datagridview.
>
> I guess need a dataset as result to connet it as datasource to the
> datagrid?
>
>
> Thanks in advance
>
> Manfred


Mar 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.