--____LPHMXLZMXOMRLFKSEJCW____
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi I am trying to fill a datagrid using the following snippet:
GetSQL =3D "Select QID, Q, A, B, C, D, CorrectAnswer, Expired " & _
"From Questions " & _
"INNER JOIN " & _
"QuestionTypesList ON Questions.QTID =3D QuestionTypesList=
.QTID " & _
"WHERE (QuestionTypesList.QuestionTypes =3D '" & =
QsetSelected & "')"
rs.Close()
rs.Open(GetSQL, ConfigCN, ADODB.CursorTypeEnum.adOpenStatic, =
ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
Dim da As OleDbDataAdapter =3D New OleDbDataAdapter
Dim ds As DataSet =3D New DataSet
Try
da.Fill(ds, rs, "QTable")
Catch ex As Exception
MsgBox(ex)
End Try
DataGrid1.DataSource =3D ds.Tables(0)
But when I do I get a catch error when trying da.fill:
Argument 'Prompt' cannot be converted to type 'String'.
Any ideas/suggestions 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 I am trying to fill a datagrid using the following snippet:</DIV>
<DIV>GetSQL =3D "Select QID, Q, A, B, C, D, CorrectAnswer, Expired " & =
_<BR> &nbs=
p; "From Questions " & _<BR> &=
nbsp; &nbs=
p; "INNER JOIN " & _<BR>  =
; "QuestionTypesList ON =
Questions.QTID =3D QuestionTypesList.QTID " & _<BR> &n=
bsp;  =
; "WHERE (QuestionTypesList.QuestionTypes =3D '" & QsetSelected & =
"')"</DIV>
<DIV> </DIV>
<DIV> rs.Close()<BR> &=
nbsp; rs.Open(GetSQL, ConfigCN, ADODB.CursorTypeEnu=
m.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)<BR> &=
nbsp; rs.MoveFirst()<BR> &nb=
sp; Dim da As OleDbDataAdapter =3D New OleDbDataAdapter<BR> &nbs=
p; Dim ds As DataSet =3D New DataSet<BR> =
; Try<BR> =
da.Fill(ds, rs, "QTable")<BR> &nb=
sp; Catch ex As Exception<BR> &nbs=
p; MsgBox(ex)<BR> &nbs=
p; End Try<BR> &=
nbsp; DataGrid1.DataSource =3D ds.Tables(0)</DIV>
<DIV> </DIV>
<DIV>But when I do I get a catch error when trying da.fill:</DIV>
<DIV>Argument 'Prompt' cannot be converted to type 'String'.</DIV>
<DIV> </DIV>
<DIV>Any ideas/suggestions welcome!</DIV>
<DIV> </DIV>
<DIV>Cheers</DIV>
<DIV>Adam</DIV></BODY></HTML>
--____WHPEPQYSAQXEHDGESJXG____--
--____LPHMXLZMXOMRLFKSEJCW____--