Results 1 to 7 of 7

Thread: Question about Access database and VB6 [resolved]

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Resolved Question about Access database and VB6 [resolved]

    I'm completely new to databases so I'm not sure where to start. I made a table in Access 2003 and I created a datagrid that is connected to it using the wizard, but I want to insert records and create a connection without using the dataGrid. I've tried searching for a tutorial on this, but maybe I'm looking in the wrong place. Can anyone point me in the right direction to look in?
    Last edited by just_a_me; Sep 20th, 2005 at 09:22 AM. Reason: resolved

  2. #2

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: Question about Access database and VB6

    I asked the question because I haven't found what I needed by doing similar searches on the forums. While I'm not new to programming, I'm new to databases as of today and need a very fundamental place to start. I guess I'm off to the bookstore then.

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Question about Access database and VB6

    just_a_me,

    Take a look at my signature for the Multi Database Connection. It should help you. Also read Database Problems in my signature too.

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Question about Access database and VB6

    Quote Originally Posted by just_a_me
    I asked the question because I haven't found what I needed by doing similar searches on the forums. While I'm not new to programming, I'm new to databases as of today and need a very fundamental place to start. I guess I'm off to the bookstore then.
    I understand... The following book could be a good start.

    Beginning Visual Basic 6 Database Programming

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Question about Access database and VB6

    Quote Originally Posted by just_a_me
    I'm completely new to databases so I'm not sure where to start. I made a table in Access 2003 and I created a datagrid that is connected to it using the wizard, but I want to insert records and create a connection without using the dataGrid. I've tried searching for a tutorial on this, but maybe I'm looking in the wrong place. Can anyone point me in the right direction to look in?
    Here is a start.
    VB Code:
    1. Dim ADOCn As ADODB.Connection
    2. Dim ConnString As String
    3.  
    4. ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    5.         "Data Source=c:\YourMdbName.mdb;" & _
    6.         "Persist Security Info=False"
    7.  
    8. Set ADOCn = New ADODB.Connection
    9. ADOCn.ConnectionString = ConnString
    10. ADOCn.Open ConnString
    The only thing you need to make this work is a reference to the Microsoft ActiveX Object Library.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    230

    Re: Question about Access database and VB6

    Thanks guys. That's what I needed. I found that book at the library too.

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