casualrich
Member
- Joined
- Dec 17, 2008
- Messages
- 12
- Programming Experience
- 1-3
hi i need help with this, im trying to gather information from 3 tables at once
when i run the program it comes up with this please help
DataAdapter.Fill(dt) =Invalid bracketing of name 'Engineers_Allocated},SELECT Surname, Firstname FROM {Engineers}, SELECT CompanyDetails, ProblemDescription FROM [Jobs'.
VB.NET:
Private Sub butinfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butinfo.Click
GroupBox3.Visible = True
Dim dt As New DataTable
Dim commStr As String = "Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= EngineerJobs01.MDB"
Dim sqlStr As String = "SELECT ID, EngineerNO, JobNo FROM [Engineers_Allocated},SELECT Surname, Firstname FROM {Engineers}, SELECT CompanyDetails, ProblemDescription FROM [Jobs]"
Dim DataAdapter As New OleDb.OleDbDataAdapter(sqlStr, commStr)
DataAdapter.Fill(dt)
DataAdapter.Dispose()
Me.DataGridView2.DataSource = dt
End Sub
End Class
when i run the program it comes up with this please help
DataAdapter.Fill(dt) =Invalid bracketing of name 'Engineers_Allocated},SELECT Surname, Firstname FROM {Engineers}, SELECT CompanyDetails, ProblemDescription FROM [Jobs'.