A
Adam Maltby
Hi I am trying to fill a datagrid using the following snippet:
GetSQL = "Select QID, Q, A, B, C, D, CorrectAnswer, Expired " & _
"From Questions " & _
"INNER JOIN " & _
"QuestionTypesList ON Questions.QTID = QuestionTypesList..QTID " & _
"WHERE (QuestionTypesList.QuestionTypes = '" & QsetSelected & "')"
rs.Close()
rs.Open(GetSQL, ConfigCN, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
Dim da As OleDbDataAdapter = New OleDbDataAdapter
Dim ds As DataSet = New DataSet
Try
da.Fill(ds, rs, "QTable")
Catch ex As Exception
MsgBox(ex)
End Try
DataGrid1.DataSource = 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
GetSQL = "Select QID, Q, A, B, C, D, CorrectAnswer, Expired " & _
"From Questions " & _
"INNER JOIN " & _
"QuestionTypesList ON Questions.QTID = QuestionTypesList..QTID " & _
"WHERE (QuestionTypesList.QuestionTypes = '" & QsetSelected & "')"
rs.Close()
rs.Open(GetSQL, ConfigCN, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
Dim da As OleDbDataAdapter = New OleDbDataAdapter
Dim ds As DataSet = New DataSet
Try
da.Fill(ds, rs, "QTable")
Catch ex As Exception
MsgBox(ex)
End Try
DataGrid1.DataSource = 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