UPDATE: Found the error to be related to the path. A literal path fixed the problem temporarily. Need to resolve this for deployment though.
I am trying to access a SQL Lite table from VS2008 VB.net, using SQLLITE ADO Provider v1.0.66. I have successfully opened and extracted data with this exact configuration to populate the SQL Express DB on a web site. But now when trying to execute a select stmt to populate a reader I am getting table not found, its the same table I read from earlier. This query works perfectly in SQLLite Expert Pro v.3.3.40.2189. Any help would be appreciated, the connection correctly shows it is opening. I have tried other tables in the same db and other similar dbs. Out come is the same. Its as if the Info Schema is not available to the ADO Provider.
szSQL = "SELECT * FROM AT_Strings WHERE language = 'en'"
Dim ds As New DataSet
Dim pConn As New SQLiteConnection
pConn = New SQLiteConnection(String.Format("Data Source={0};Version=3;", databaseFile))
Try
pConn.Open()
Catch oleex As SQLiteException 'handle a password error.
Try
Const pw As String = "password" 'For testing here
pConn = New SQLiteConnection(String.Format("Data Source={0};Version=3;Password={1};", databaseFile, pw))
pConn.Open()
Catch ex As Exception
Throw
End Try
End Try
Dim dt As New DataTable("AT_Strings")
Dim da As SQLiteDataAdapter
da = New SQLiteDataAdapter(szSQL, pConn)
da.Fill(dt)
Dim Row As Integer = dt.Rows.Count - 1
Label2.Text = Row
pConn.Close()
SQLite error
no such table: AT_Strings
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SQLite.SQLiteException: SQLite error
no such table: AT_Strings
Source Error:
Line 115:
Line 116: da = New SQLiteDataAdapter(szSQL, pConn)
ERRORS ON LINE 117!
Line 117: da.Fill(dt)
Line 118:
Line 119: Dim Row As Integer = dt.Rows.Count – 1
Found the error to be related to the path. A literal path fixed the problem temporarily. Need to resolve this for deployment though.