Results 1 to 3 of 3

Thread: how to acces from mdf file

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    10

    how to acces from mdf file

    hi, guy
    I'm still new to vb

    I try to get acess to the mdf file in one paticular file
    here what i want to do
    if the user select the wrong answer, then It show a messagebox whith the right answer.

    Code:
    Dim recPtrPos as integer
    Dim Correct As string = Me.TriviaDataSet.Game1(recPtrPos).CorrectAnswer
    If userAnswer <>  Correct then
    'the problem here
      MessageBox.Show("The correct answer is: " & Correct, "Correct Answer", _
    MessageBoxButtons.OK, MessageBoxIcon.Information)
    Thank you

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: how to acces from mdf file

    So what's the actual question?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    10

    Re: how to acces from mdf file

    My question is how can I show a message box with the right answer
    here "MessageBox.Show("The correct answer is: " & Correct" )whent the user select the wrong answer. the "Correct" is a field from the database Game1.

    I was thinking problebly I have to use the loop, but i don't know how.
    Andy advice?

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