|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How display Result from sqlCommand select in the DatagridviewHi 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 Manfred,
Yes, in fact the most simple a datatable. Use a sqldataadapter to fill that dataset Cor Show quoteHide quote "Manfred" <m**@USENEThsk.ch> schreef in bericht news:uxiNbEmTGHA.4436@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 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: Show quoteHide quote > Manfred, > > Yes, in fact the most simple a datatable. > > Use a sqldataadapter to fill that dataset > > Cor > > "Manfred" <m**@USENEThsk.ch> schreef in bericht > news:uxiNbEmTGHA.4436@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 > > 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/library/system.data.sqlclient.sqldataadapter.aspx I hope this gives some ideas Cor Show quoteHide quote "Manfred" <m**@USENEThsk.ch> schreef in bericht news:%23sfpGTnTGHA.4384@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" <m**@USENEThsk.ch> schreef in bericht >> news:uxiNbEmTGHA.4436@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 >> >> >
Data Source with ReportViewer
DataGrid Custom Styles Learning - displaying selection in pictureboxes Null, DBNull, Nothing, VBNullstring Create 30 Day trial version how to avoid broken references when give out projects Help needed using sample RS232 class to read from serial port Opening a query in MS Access with parameters using VB.net VB05 Express Date/Time Picker control Different colored lines in the same textbox |
|||||||||||||||||||||||