Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    DataBase to VB6 (Access 2000)

    If I design a database/table in Access 2000, is there a way to do so that will be readable by VB6? I know that if I design in VB6, Access can read it, but Access cannot make design changes without updating to 2000.

    Can I go the other way?

    Or instead, how or what do I design that will be readable by bothe Access 2000 and VB6? Will the data I input through VB6 be readable and editable in Access?

    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DataBase to VB6 (Access 2000)

    Both VB6 and Access can use the same datafile. In VB6, you can't use some of the dumber wizards like the Visual Data Manager, because they expect 97 (which was based on VB5!) but if you do the work youself in code or use the Data View Window to add a data link, there is nothing to prevent you from creating an mdb in one and using it in the other.
    Charlotte

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: DataBase to VB6 (Access 2000)

    As Charlotte notes, it can be done either way. In fact we have a product which is administered by an Access front-end database, but is read by a small VB app that runs on each workstation using the application, and it works quite well.
    Wendell

  4. #4
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Charlotte:

    Then what have I done wrong? 'Cause I have a table that was created in Access 2000 (no data, but is "openable" in 2000), but when I put a data control in VB6, and try to select the RecordSource, I get an error "Unrecognized database format..."

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DataBase to VB6 (Access 2000)

    You should not use the Data control that is available in the standard set of components - it expects Access 97 database format.
    - Right-click the toolbox.
    - Select Components...
    - Locate and tick "Microsoft ADO Data Control 6.0 (OLEDB)"
    - Click OK.
    - A new control will be displayed in the toolbox. If you hover the mouse over it, the tooltip says Adodc.
    - Put a new Adodc control on your form.
    - Click the ... in the ConnectionString property.
    - Click Build...
    - Select "Microsoft Jet 4.0 OLE DB Provider".
    - Click Next>>.
    - Click ... to select a database.
    - When you have done so, click "Test connection" to see if you can open the database.
    - Click OK twice.
    - Click ... in the RecordSource property.
    - Select " 2 - adCmdTable" as Command Type.
    - Select the table from the next dropdown.
    - Click OK.
    - Now create text boxes, set their DataSource and DataField properties etc.

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DataBase to VB6 (Access 2000)

    The datacontrol defaults to Access 97. For some reason I fail to understand, Microsoft decided to keep "Access" meaning Access 97. YOu have to specify "Access 2000" in the Connect property of the datacontrol to handle the 2000 format.
    Charlotte

  7. #7
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Charlotte:

    I only have an "Access" choice in the Connect property no Access 2000...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Update:

    Hans / Charlotte:

    I think I *may* have it... I'll be back...

    Chuck

    Hans:

    >>Click ... to select a database.<<

    Everything went fine till here... No table listed, and no drop-down to search with...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DataBase to VB6 (Access 2000)

    Are you saying that the connect list doesn't include Access 2000? What Jet provider are you using for the DataLink?
    Charlotte

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Charlotte:

    Microsoft.Jet.OLEDB.4.0

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: DataBase to VB6 (Access 2000)

    Then perhaps you don't have the ODBC drivers installed.

    Go to the datalink properties with the Jet 4 OleDB provider selected on the provider tab and click the "Next" button or click on the connection tab. On the connection tab, browse to an A2k mdb and select that as your database. If you used an unsecured workgroup, accept the default Admin as the username , check Blank password, and click the Test Connection button. Do you get a valid connection? If so, navigate to that database as the database for your datacontrol. If you have the drivers installed for other database formats like dBase, Access 2000, Excel, etc., you should see a list of choices in the Connect property drop down. If not, you need to install them.
    Charlotte

  12. #12
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    In addition... I reviewed the Access install, and excluding some clip art, it seems to be all there...

    C


    Charlotte:

    OK, this is getting too strange...

    I got no A2k.mdb (or a2k*.* For that matter.

    ??

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  13. #13
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DataBase to VB6 (Access 2000)

    By 'an A2K mdb' <!profile=Charlotte>Charlotte<!/profile> mean any database you have created with Access 2000
    Francois

  14. #14
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Francois:
    Duh... Thanks...

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  15. #15
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: DataBase to VB6 (Access 2000)

    Francois:

    I'm getting, I fear, a bit fuddled.

    I used Has's instructions to set up the "Adobe" control (post in this thread)...

    Using Charlotte's sequence, I can get as far as "getting a valid connection"... the database is already showing in the field above... But I see no drop-down at this point.

    Where might it be?

    Chuck


    Go to the datalink properties with the Jet 4 OleDB provider selected on the provider tab and click the "Next" button or click on the connection tab. On the connection tab, browse to an A2k mdb and select that as your database. If you used an unsecured workgroup, accept the default Admin as the username , check Blank password, and click the Test Connection button. Do you get a valid connection? If so, navigate to that database as the database for your datacontrol. If you have the drivers installed for other database formats like dBase, Access 2000, Excel, etc., you should see a list of choices in the Connect property drop down. If not, you need to install them.
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •