A
Adam Maltby
Hi,
I am trying to populate a dropdown combobox using:
Dim GetSQL As String = "Select QID, QuestionTypes " & _
"From QuestionTypesList " & _
"Order By QuestionTypes"
Dim cn As New OleDb.OleDbConnection(Globals.udl0Val)
Dim da As New OleDbDataAdapter(GetSQL, cn)
Dim ds As New DataSet
cn.Open()
da.Fill(ds, "QT")
cn.Close()
Dim dt As New DataTable
dt = ds.Tables("QT")
cmb_Qset.DataSource = dt
cmb_Qset.DisplayMember = "QuestionTypes"
cmb_Qset.ValueMember = "QID"
cmb_Qset.SelectedIndex = -1
It is failing at the da.fill with an unhandled exception in System.Data.Dll
Any ideas would be most welcome.
Cheers
Adam
I am trying to populate a dropdown combobox using:
Dim GetSQL As String = "Select QID, QuestionTypes " & _
"From QuestionTypesList " & _
"Order By QuestionTypes"
Dim cn As New OleDb.OleDbConnection(Globals.udl0Val)
Dim da As New OleDbDataAdapter(GetSQL, cn)
Dim ds As New DataSet
cn.Open()
da.Fill(ds, "QT")
cn.Close()
Dim dt As New DataTable
dt = ds.Tables("QT")
cmb_Qset.DataSource = dt
cmb_Qset.DisplayMember = "QuestionTypes"
cmb_Qset.ValueMember = "QID"
cmb_Qset.SelectedIndex = -1
It is failing at the da.fill with an unhandled exception in System.Data.Dll
Any ideas would be most welcome.
Cheers
Adam