How do i retrieve the data in VB.NET using Microsoft access?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hannie

    How do i retrieve the data in VB.NET using Microsoft access?

    I am currently doing my project using VB.NET
    I have a database which contains all my data that the user key in.

    The problem is, when i click the retrieve button on the form, the
    details that the user keyed in cant be retrieve.

    The connection is made, just that the data cant be retrive.
    Hope someone can help mi... Thanks. its urgent... =]

  • W.G. Ryan eMVP

    #2
    Re: How do i retrieve the data in VB.NET using Microsoft access?

    OleDbDataAdapte r.... + Google.

    --
    W.G. Ryan MVP (Windows Embedded)

    TiBA Solutions
    www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
    "Hannie" <doraemonblues@ hotmail.com> wrote in message
    news:1105504376 .735176.118190@ c13g2000cwb.goo glegroups.com.. .[color=blue]
    > I am currently doing my project using VB.NET
    > I have a database which contains all my data that the user key in.
    >
    > The problem is, when i click the retrieve button on the form, the
    > details that the user keyed in cant be retrieve.
    >
    > The connection is made, just that the data cant be retrive.
    > Hope someone can help mi... Thanks. its urgent... =]
    >[/color]


    Comment

    • Cor Ligthert

      #3
      Re: How do i retrieve the data in VB.NET using Microsoft access?

      Hannie,

      You would have to tell something more, to get help.
      By instance
      Do you use a dataadapter
      Does the user typein in a datagrid
      What is the actions you do when the user has pushed in that button

      After that maybe we can than help you.

      Cor


      Comment

      • Hannie

        #4
        Re: How do i retrieve the data in VB.NET using Microsoft access?


        Cor Ligthert wrote:[color=blue]
        > Hannie,
        >
        > You would have to tell something more, to get help.
        > By instance
        > Do you use a dataadapter
        > Does the user typein in a datagrid
        > What is the actions you do when the user has pushed in that button
        >
        > After that maybe we can than help you.
        >
        > Cor[/color]

        Um, well i m using the OleDb connection codings to link to the
        database.

        My program works like this...

        Form One: a pic of a hand with alot of buttons representing the
        accupoints of our hands.
        Then the user will click the buttons according to the accupoints that
        he/shes find that its giving em problem.

        When points that the user click will go into the database.

        at the bottom of form one., theres a analyse button.

        When it is click, it will show form 2

        Form 2: Form 2 will show the causes and remedies of the accupoints
        that the user click previously.

        So, what form 2 will do is to extract the CORRECT info from the corrct
        row n column which the user enter.

        For eg, If i click the button name Fever, then when i click the Analyse
        button, only the causes and remedies of Fever will show. Not others.

        So basically thats how i wan it to work.. Hope u can help mi. Thanks
        alot..!

        Comment

        • Chris, Master of All Things Insignificant

          #5
          Re: How do i retrieve the data in VB.NET using Microsoft access?

          How are you storing the data in the database? What query are you using to
          retrieve it? Can you view the data in the database? Post the code you are
          using to do the retrieval.

          Chris

          "Hannie" <doraemonblues@ hotmail.com> wrote in message
          news:1105540353 .438597.228540@ c13g2000cwb.goo glegroups.com.. .[color=blue]
          >
          > Cor Ligthert wrote:[color=green]
          >> Hannie,
          >>
          >> You would have to tell something more, to get help.
          >> By instance
          >> Do you use a dataadapter
          >> Does the user typein in a datagrid
          >> What is the actions you do when the user has pushed in that button
          >>
          >> After that maybe we can than help you.
          >>
          >> Cor[/color]
          >
          > Um, well i m using the OleDb connection codings to link to the
          > database.
          >
          > My program works like this...
          >
          > Form One: a pic of a hand with alot of buttons representing the
          > accupoints of our hands.
          > Then the user will click the buttons according to the accupoints that
          > he/shes find that its giving em problem.
          >
          > When points that the user click will go into the database.
          >
          > at the bottom of form one., theres a analyse button.
          >
          > When it is click, it will show form 2
          >
          > Form 2: Form 2 will show the causes and remedies of the accupoints
          > that the user click previously.
          >
          > So, what form 2 will do is to extract the CORRECT info from the corrct
          > row n column which the user enter.
          >
          > For eg, If i click the button name Fever, then when i click the Analyse
          > button, only the causes and remedies of Fever will show. Not others.
          >
          > So basically thats how i wan it to work.. Hope u can help mi. Thanks
          > alot..!
          >[/color]


          Comment

          • Cor Ligthert

            #6
            Re: How do i retrieve the data in VB.NET using Microsoft access?

            Hannie,

            When I understand you well, is a way you can do it creating an array of
            strings and depending of the pushed button is set an index that I have set
            global in my program that you do with
            \\\
            private mystrings() as strings = {"Text1","Text2 ",etc}
            private mybuttonindexer as integer
            private da as new Oledb.OledbData adapter
            ///
            Than using that index you are able to show information in a listbox or a
            combobox that is set to dropdownlist.

            Than I would in those buttonclick event start a routine as this (the first
            item in the array has index 0)

            \\\This part in your load event
            Dim conn As New OleDb.OleDbConn ection _
            ("Provider=Micr osoft.Jet.OLEDB .4.0;Data Source=c:\test1 \myMdb")
            da = New OleDb.OleDbData Adapter _
            ("SELECT * FROM MyTable WHERE (ButtonText = ?)
            da.SelectComman d.Parameters.Ad d _
            (New OleDb.OleDbPara meter("", OleDb.OleDbType .Date))
            da.SelectComman d.Parameters.Ad d _
            (New OleDb.OleDbPara meter("", OleDb.OleDbType .Date))
            ////

            \\\This as a sub to process after a buttonclick
            da.SelectComman d.Parameters(0) .Value = MyStrings(mybut tonindexer)
            Dim ds As New DataSet
            da.Fill(ds)
            DataList1.DataS ource = Nothing
            DataList1.DataS ource = ds.Tables(0)
            DataList1.Displ ayMember = "FistSelect ion"
            DataList1.Value Member = "RealSelect ion"
            ///

            Than when the selection is made, use that valuemember to get the second form
            information.
            However I think that this is enough to start with and when you have done
            this you find easily your next steps (it depends what control you use).

            This is made in this message to show, so it can contain typos or other
            unseen errors.

            I hope this helps,

            Cor


            Comment

            Working...