how to connect vb to access db....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas1111
    New Member
    • Feb 2008
    • 122

    how to connect vb to access db....

    How to connect visual basic to access database without using adodc...
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Try to use ADODB.

    Project ----> refrence---------> select ADO library .

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      This has been covered hundreds of times, try sing the search and im sure you will find alot of information.

      What version are you using?

      Comment

      • vikas1111
        New Member
        • Feb 2008
        • 122

        #4
        Originally posted by jamesd0142
        This has been covered hundreds of times, try sing the search and im sure you will find alot of information.

        What version are you using?

        Hi i am using visual basic 6 and MSaccess07

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          Have you tried as suggested in previous posts in this thread ?

          Comment

          • vikas1111
            New Member
            • Feb 2008
            • 122

            #6
            Originally posted by debasisdas
            Have you tried as suggested in previous posts in this thread ?
            Hi Debasis
            I am not able to find adodb in the link you have provided.

            Comment

            • debasisdas
              Recognized Expert Expert
              • Dec 2006
              • 8119

              #7
              Originally posted by vikas1111
              Hi Debasis
              I am not able to find adodb in the link you have provided.
              Did you find Microsoft ActivexDataObject .

              select the higher version.

              Comment

              • vikas1111
                New Member
                • Feb 2008
                • 122

                #8
                Originally posted by vikas1111
                How to connect visual basic to access database without using adodc...
                This is the code which i have written..
                Dim c As ADODB.Connectio n
                Dim rs As New ADODB.Connectio n
                Private Sub Form_Load()
                Dim cs As String
                Set myconn = New ADODB.Connectio n
                myconn.Connecti onString = "provider=micro soft.jet.oledb. 4;"
                dbpath = "d:/name of the file.mdb"
                rs.Open "select * from name of the table which i want to access", c, adOpenStatic
                Me.Text1.Text = rs(no.of column)
                End Sub


                ERROR I AM GETTING IS INVALID PROPERTY ASSIGNMENT

                Comment

                • vikas1111
                  New Member
                  • Feb 2008
                  • 122

                  #9
                  Originally posted by debasisdas
                  Did you find Microsoft ActivexDataObject .

                  select the higher version.

                  yes microsoft activex data object is there

                  Comment

                  • debasisdas
                    Recognized Expert Expert
                    • Dec 2006
                    • 8119

                    #10
                    You have declared c ,but using myconn

                    Comment

                    Working...