开发者

C# SQLite Datgridview to display database

I have a data grid view that is connected to a database. So, the flow is

datagridview's开发者_Go百科 source is a binding source. the binding source is related to a dataset. the dataset has a database adapter that is connected to a database say test.db

Every-time i open the program, it loads this database. But i am able to open other databases if they are of the same type (i.e Columns and Column datatype)

I want to know if this is the correct way of connecting a datagrid view to a database. Also, Is it possible for me to modify the connection string of the adapter dynamically.?


Your process seems fine.

You can set the ConnectionString property to whatever you want; you should use the ConnectionStringBuilder class to safely build the connection strings.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜