please trying load tables in sqlite database combobox keep getting error: unhandled exception of type 'system.argumentexception' occurred in system.data.sqlite.dll
additional information: invalid connectionstring format part "c:\sqlitetest\sqlite_test\bin\debug\test.db", no equal sign found:
the following code. vs keeps highlighting: sqlconnect.open()
dim db string = "c:\sqlitetest\sqlite_test\bin\debug\test.db; version=3;"
private sub button1_click(sender object, e eventargs) handles button1.click dim sqlconnect new sqlite.sqliteconnection() dim sqlcommand sqlitecommand sqlconnect.connectionstring = db sqlconnect.open() sqlcommand = sqlconnect.createcommand dim schematable = sqlconnect.getschema(sqlitemetadatacollectionnames.tables) int integer = 0 schematable.rows.count - 1 if schematable.rows(int)!table_type.tostring = "table" me.combobox1.items.add(schematable.rows(int)!table_name.tostring()) end if next sqlcommand.dispose() sqlconnect.close() end sub
assuming using sqlite.net provider connection should below:
dim db string = "data source=c:\sqlitetest\sqlite_test\bin\debug\test.db; version=3;"
see the connection strings reference more information , samples.
Comments
Post a Comment