|
-
Mar 10th, 2015, 12:09 PM
#1
Thread Starter
Member
[RESOLVED] Needing your expertise - assign database value to array
Dim conn As New OleDbConnection("connection string")
Dim cmd As OleDbCommand
Dim CorrectAnswer(19) As String
For x As Integer = 1 To 20
cmd = New OleDbCommand(String.Format("Select AnswerValue from tbl_ECM_Questionnaire where QuestionID = {0} and CorrectAnswer = 'Y'", x), conn)
CorrectAnswer(x - 1) = cmd.ExecuteScalar.ToString
Next
Last edited by Serigraphie; May 14th, 2015 at 01:11 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|