Alpha Video Training
Results 1 to 3 of 3

Thread: DAO, ADO and all that stuff

  1. #1
    Roy Lasris

    Default DAO, ADO and all that stuff

    I am trying to link my A5 database to my MSWord97 projects and am having a devil of a time doing so. I want to keep A5 for collecting and reporting data (because it is so easy), but do document writing and assembly with via Word. I have accomplished an effective, but rather slow link to my data via ODBC, but want to try to implement connections to what I understand are more powerful linking tools of DAO and ADO.

    My problem is in the initial coding. I cannot get the database to open. An answer to the following questions may help. Is the .dbf or is the .adb file the parallel to the .mdb file used by Access. (I ask because all of the examples given in the book I am using pre-suppose an .mdb file, even though the Microsoft.Jet programs profess complete compatibility with .dBase style files.

    I have DAO 3.51 Object Library loaded and registered. This is my code in the macro which I have written, following the examples given, to open up the database.

    Const connectStr = "PROVIDED=Microsoft.Jet.OLEDB.3.51;Data Source=C:datadatabasesdomstuff.dbf;"
    Dim myConnect As New ADODB.Connection
    Dim myRS As New ADODB.Recordset
    With myConnect
    .ConnectionString = connectStr
    .ConnectionTimeout = 10
    End With
    When the .Open command is executed, I get an error, saying "DataSource name not found and no default drive specified."

    What's missing? Thanks for any help.

    Roy Lasris

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000

    Default RE: DAO, ADO and all that stuff

    Sounds as though you want to connect to the DBF using VisualBasic. Or the scripting language built in to Word. Can't help you with either. You might try newsgroups devoted to VisualBasic and databases. I suspect that VB programmers are very familiar with the steps necessary to connect to dBase or FoxPro files. I think A5 uses a format that's compatible with Foxpro 2.6

    -- tom

  3. #3
    Geoffrey Hollander

    Default RE: DAO, ADO and all that stuff


    I'm somewhat new to VB (VBA with Word), but some of what follows might help.

    You can find the code to connect to a variety of databases through either DAO, Microsoft's older connection technology, or with ADO -- supposedly newer, better and headed for world database domination (at least in the Microsoft/VB/VBA realms).

    ADO is an easier connection to make, but handles xBase file operations very slowly. The DAO connections seem to be much faster when running through the same operations.

    For Alpha Five connections, try connectiong to the ****.DBF file using either a FoxPro or dBase III specification.

    Make sure that you have the most current ODBC drivers from Microsoft.

    Good luck...


    Geoff Hollsnder

Similar Threads

  1. OS Preference and other stuff
    By Chris.Tanti in forum Web Application Server v6
    Replies: 2
    Last Post: 09-20-2004, 10:14 AM
  2. Set stuff
    By James Peterson in forum Alpha Five Version 5
    Replies: 13
    Last Post: 03-02-2003, 10:40 AM
  3. STUFF stuff
    By French in forum Alpha Five Version 4
    Replies: 2
    Last Post: 09-05-2002, 07:30 AM
  4. simple stuff
    By ken miller in forum Alpha Five Version 4
    Replies: 1
    Last Post: 04-17-2002, 07:27 PM
  5. wonkey stuff again
    By eeetee in forum Alpha Five Version 4
    Replies: 2
    Last Post: 01-05-2002, 05:14 PM


Posting Permissions

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