c# - "Keyword not supported:'pdata source" -
what mean "keyword not supported:'pdata source".as struggling find out problem?
initializecomponent(); connstring = "pdata source=.\\sqlexpress;attachdbfilename=c:\\users\andrew\\documents\\vinyl0.mdf;integrated security=true;connect timeout=30;user instance=true"; query = "select * record"; dadapter = new sqldataadapter(query, connstring); dtable = new datatable(); cbuilder = new sqlcommandbuilder(dadapter); cbuilder.quoteprefix = "["; cbuilder.quotesuffix = "]"; mydataview = dtable.defaultview; dadapter.fill(dtable); bindingsource bndsource = new bindingsource(); bndsource.datasource = dtable; this.datagridview1.datasource = bndsource; (int q = 0; q <= datagridview1.columncount - 1; q++) {
your connection string incorrect.
change pdata source
data source
or server
, should fine.
see building connection strings article , this article understand construct of connection strings based on version/data adapter.
Comments
Post a Comment