Filling a DataGridView with a dataset using parameters

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
garling
Posts: 8
Joined: Tue 28 Jul 2015 18:51

Filling a DataGridView with a dataset using parameters

Post by garling » Tue 28 Jul 2015 18:57

I created a dataset to my SQLite db and I set up a parameter to retrieve data from it. How do I fill by datagrid view with the dataset using a parameter?

This is what I have used before to fill with out a parameter:

Code: Select all

orderHeaderSurfaceDataGridView.DataSource = dsPendingOrders1.Tables[1];
            dsPendingOrders1.Fill();
How would I pass a parameter in?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Filling a DataGridView with a dataset using parameters

Post by Shalex » Fri 31 Jul 2015 16:57

Code: Select all

orderHeaderSurfaceDataGridView.DataSource = dsPendingOrders1.Tables[1];
(dsPendingOrders1.Tables[1] as Devart.Data.SQLite.SQLiteDataTable).SelectCommand.Parameters["p"].Value = "some value";
dsPendingOrders1.Fill();
Is that what you need? If not, please send us a small test project so that we can better understand a scenario you want to implement.

garling
Posts: 8
Joined: Tue 28 Jul 2015 18:51

Re: Filling a DataGridView with a dataset using parameters

Post by garling » Wed 05 Aug 2015 17:07

I have it working now thanks.

Post Reply