levyuk
Well-known member
Anyone see anything wrong with this.
Sorry about the long select going off the page.
I get this error message "Syntax error (missing operator) in query expression 'Java Developer = C.JobType'"
VB.NET:
[size=2][color=#0000ff]Try
[/color][/size][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] table [/size][size=2][color=#0000ff]As[/color][/size][size=2] DataTable
table = [/size][size=2][color=#0000ff]New[/color][/size][size=2] DataTable
OleDbConnection1.Open()
[/size][size=2][color=#0000ff]Me[/color][/size][size=2].OleDbDataAdapter1.SelectCommand.CommandText = "SELECT S.EnrolmentNumber, S.Forename, S.Surname, S.TelephoneNumber, C.CompanyName, C.ContactName, C.ContactNumber, S.Location, S.Jobtype FROM (Student S INNER JOIN Company C ON " & [/size][size=2][color=#0000ff]Me[/color][/size][size=2].ComboBoxStudentJobType.SelectedItem & " = C.JobType AND " & [/size][size=2][color=#0000ff]Me[/color][/size][size=2].ComboBoxStudentLocation.SelectedItem & " = C.Location) WHERE (S.Placed = No)"
[/size][size=2][color=#0000ff]Me[/color][/size][size=2].OleDbDataAdapter1.Fill(table)
[/size][size=2][color=#0000ff]Me[/color][/size][size=2].OleDbConnection1.Close()
[/size][size=2][color=#0000ff]Me[/color][/size][size=2].DataGrid1.DataSource = table
[/size][size=2][color=#0000ff]Catch[/color][/size][size=2] ex [/size][size=2][color=#0000ff]As[/color][/size][size=2] Exception
MessageBox.Show(ex.Message)
[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Try
[/color][/size]
Sorry about the long select going off the page.
I get this error message "Syntax error (missing operator) in query expression 'Java Developer = C.JobType'"