Hi,All,
I am try to develop a project where the back en database is MS access, front end is vb6 and connectivity establish by odbc.
the database content multiple table.
Frost table student contain roll, name
second table marks contain roll, math, English
there is four text box namely txtRoll, taxonomy, txtMath, txtEnglish the code for is given below
Dim Cn As Connection
Dim Rs As Recordset
Dim cString As String
Private Sub Form_Load()
Set Cn = New Connection
cString = "DSN=kaka;Uid=admin;Pwd="
With Cn
.ConnectionString = cString
.CursorLocation = adUseServer
.Open
End With
Set Rs = New Recordset
cString = "SELECT rollp, namep, matp, Inglis FROM student, marks WHERE student.rollP=marks.rollP"
Rs.Open cString, Cn, adOpenStatic, adLockOptimistic, adCmdTable
txtRoll.Text = Rs.Fields("Roll")
txtName.Text = Rs.Fields("Namep")
txtMath.Text = Rs.Fields("Mathp")
txtEnglish.Text = Rs.Fields("Englishp")
Rs.Close
Cn.Close
End Sub
When I run this program I got an Error massage -
Run-time error '-2147217900(80040e14)':
[Microsoft][ODBC Micro Access Driver] Syntax error in FROM clause.
Please Help me.