--____LPHMXLZMXOMRLFKSEJCW____
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi,
I am trying to populate a dropdown combobox using:
Dim GetSQL As String =3D "Select QID, QuestionTypes " & _
"From QuestionTypesList " & _=20
"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 =3D ds.Tables("QT")
cmb_Qset.DataSource =3D dt
cmb_Qset.DisplayMember =3D "QuestionTypes"
cmb_Qset.ValueMember =3D "QID"
cmb_Qset.SelectedIndex =3D -1
It is failing at the da.fill with an unhandled exception in System.Data.Dll=
Any ideas would be most welcome.
Cheers
Adam
--____LPHMXLZMXOMRLFKSEJCW____
Content-Type: multipart/related; boundary="____WHPEPQYSAQXEHDGESJXG____"
--____WHPEPQYSAQXEHDGESJXG____
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 8pt Tahoma; COLOR: #000000">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I am trying to populate a dropdown combobox using:</DIV>
<DIV> </DIV>
<DIV>Dim GetSQL As String =3D "Select QID, QuestionTypes " & =
_</DIV>
<DIV> &nbs=
p; &=
nbsp; &nbs=
p; "From QuestionTypesList " & _ </DIV>
<DIV> &nbs=
p; &=
nbsp; &nbs=
p; "Order By QuestionTypes"<BR>Dim cn As New OleDb.OleDbCon=
nection(Globals.udl0Val)<BR>Dim da As New OleDbDataAdapter(GetSQL, =
cn)<BR>Dim ds As New DataSet<BR>cn.Open()<BR>da.Fill(ds, "QT")<BR>cn.Close(=
)</DIV>
<DIV>Dim dt As New DataTable<BR>dt =3D ds.Tables("QT")</DIV>
<DIV>cmb_Qset.DataSource =3D dt<BR>cmb_Qset.DisplayMember =3D "QuestionType=
s"<BR>cmb_Qset.ValueMember =3D "QID"</DIV>
<DIV>cmb_Qset.SelectedIndex =3D -1</DIV>
<DIV> </DIV>
<DIV>It is failing at the da.fill with an unhandled exception in System.Dat=
a.Dll</DIV>
<DIV> </DIV>
<DIV>Any ideas would be most welcome.</DIV>
<DIV> </DIV>
<DIV>Cheers</DIV>
<DIV>Adam</DIV></BODY></HTML>
--____WHPEPQYSAQXEHDGESJXG____--
--____LPHMXLZMXOMRLFKSEJCW____--