vb.net - Datagridview WHERE SQL Error -


i'm trying automatically fill datagridview upon loading. have far

 dim connstring string = "provider=microsoft.ace.oledb.12.0; data source=c:\users\administratot\downloads\railwaydatabase2.accdb"     dim myconn oledbconnection     dim da oledbdataadapter     dim ds dataset     dim tables datatablecollection     dim source1 new bindingsource     myconn = new oledbconnection     myconn.connectionstring = connstring     ds = new dataset     tables = ds.tables     da = new oledbdataadapter("select * tbl_shifts employeename = '" & employeelogin.usersname & "' , completed = true", myconn)     dim view new dataview(tables(0))     source1.datasource = view     datagridview2.datasource = view 

when attempt this, met error reading

cannot find table 0.

you must fill dataset first.

da = new oledbdataadapter("select * tbl_shifts employeename = '" & employeelogin.usersname & "' , completed = true", myconn) da.fill(ds) dim view new dataview(tables(0)) 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -