TheWizardofInt
Well-known member
This is a new problem
I created a new Access database with one table, with 2 fields and a key field
No matter what SQL query I use on it, it says, "Syntax Error in From Clause" when I try to write the information to a DataSet
Here is some code:
The code works if I rename everthing to an older Access database and record set
I created a new Access database with one table, with 2 fields and a key field
No matter what SQL query I use on it, it says, "Syntax Error in From Clause" when I try to write the information to a DataSet
Here is some code:
Code:
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("database/VARS.mdb") & ";"
Dim strSQL As String = "Select * From Counter Where pwd = xyz123"
Dim oConn As New SysADO.OleDbConnection(strConn)
Dim oCommand As New SysADO.OleDbCommand(strSQL, oConn)
Dim oDA As New SysADO.OleDbDataAdapter(oCommand)
Dim oDS As New System.Data.DataSet()
Dim oDr As DataRow
oConn.Open()
oDA.Fill(oDS, "Counter")
oDr = oDS.Tables("Counter").Rows(0)
Dim sNumber As String = CStr(oDr("Login"))
Dim lNumber As Long
Build our SQL query
lNumber = Val(sNumber) + 1
sNumber = CStr(lNumber)
oConn.Close()
The code works if I rename everthing to an older Access database and record set