C
Carlo B
Hi
I need to use a listbox to display authors from the authors table in the
standard BIBLIO.MDB. I haven't even got to this point yet and the code
below is bombing out on the line 'dataAdapter.Fill(dt)'.
If I only run 'Select * from Titles' then it works fine. Even if I try
'Select Titles.title from .....' it bombs.
Please help
Thanks
Carlo
Dim title, publisher As String
title = txtTitle.Text
Dim dt As New DataTable()
Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" &
"Data Source = BIBLIO.MDB"
Dim sqlstr As String = "Select * from Titles inner join 'Title
Author' on Titles.ISBN = 'Title Author'.ISBN inner join Authors on Title
Author.Au_ID = Authors.Au_ID where isbn = '0-0038326-7-8'"
Dim dataAdapter As New OleDb.OleDbDataAdapter(sqlstr, connstr)
dataAdapter.Fill(dt)
dataAdapter.Dispose()
lstDisplay.DataSource = dt
lstDisplay.DisplayMember = "Title"
I need to use a listbox to display authors from the authors table in the
standard BIBLIO.MDB. I haven't even got to this point yet and the code
below is bombing out on the line 'dataAdapter.Fill(dt)'.
If I only run 'Select * from Titles' then it works fine. Even if I try
'Select Titles.title from .....' it bombs.
Please help
Thanks
Carlo
Dim title, publisher As String
title = txtTitle.Text
Dim dt As New DataTable()
Dim connstr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" &
"Data Source = BIBLIO.MDB"
Dim sqlstr As String = "Select * from Titles inner join 'Title
Author' on Titles.ISBN = 'Title Author'.ISBN inner join Authors on Title
Author.Au_ID = Authors.Au_ID where isbn = '0-0038326-7-8'"
Dim dataAdapter As New OleDb.OleDbDataAdapter(sqlstr, connstr)
dataAdapter.Fill(dt)
dataAdapter.Dispose()
lstDisplay.DataSource = dt
lstDisplay.DisplayMember = "Title"