Results 1 to 7 of 7

Thread: [RESOLVED] Needing your expertise - assign database value to array

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2011
    Posts
    58

    Resolved [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
  •  



Click Here to Expand Forum to Full Width