Sql string to gridview

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have an sql string. What mechanism can I use to execute it and assign the
result to a gridview?

Thanks

Regards
 
Hi

I have an sql string. What mechanism can I use to execute it and assign the
result to a gridview?

Thanks

Regards

Against what type of datasource? Also, the objects you'll need most
likely reside in the System.Data namespace, so you might start
browsing through them in object browser and try to find the
appropriate classes.

Thanks,

Seth Rowe [MVP]
 
The actual database is access.

rowe_newsgroups said:
Against what type of datasource? Also, the objects you'll need most
likely reside in the System.Data namespace, so you might start
browsing through them in object browser and try to find the
appropriate classes.

Thanks,

Seth Rowe [MVP]
 
Can I use Linq for example?

rowe_newsgroups said:
Against what type of datasource? Also, the objects you'll need most
likely reside in the System.Data namespace, so you might start
browsing through them in object browser and try to find the
appropriate classes.

Thanks,

Seth Rowe [MVP]
 
Can I use Linq for example?

I wouldn't, I would use the OleDb components and access it like a
normal database.

Thanks,

Seth Rowe [MVP]
 
Actually currently there is no way (out of the box) to query the access
database using LINQ.
 
John said:
What oledb code can I use to accomplish this?

How to use Microsoft Visual Basic .NET to connect to a Microsoft Access
database and to retrieve data
<URL:http://support.microsoft.com/?scid=kb;EN-US;821765>

Once you have the dataset containing the data, you can create a
'BindingSource' object, assign the 'DataSet' object to its 'DataSource'
property and then assign the binding source to the datagridview control's
'DataSource' property, for example.
 
Back
Top