Results 1 to 2 of 2

Thread: Dbase III Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Location
    U.S.A.
    Posts
    75
    I am currently working on a project that uses a DBase III database. So far I have only used Access database and I am unsure how to connect to one.

    Does anyone have any good connection strings? Can you use Jet with a DBaseII database or so you have to use ODBC?

    I will also be needing to print out reports with this database...I was trying to use a DataEnvironment with a DataReport but so far I have had no luck.

    I Have been trying to use a SHAPE command to build a hierarchy so I can use groups...I have been successful using an Access database doing this but I keep getting errors such as :

    [Microsoft][ODBC dBase Driver] Too Few Parameters. Expected 1.

    I wish I could could switch over to an access database it would be so much easier but I am stuck

    Anyone have any suggestions?

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    you can connect with ADO this way

    Code:
    'uses ADO 2.1 or higher (Jet 4)
        Dim cn As ADODB.Connection
        Dim rs As ADODB.Recordset
        
        Set cn = New ADODB.Connection
        
        'open connection to FOLDER with DBF file
        cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyDirWithData\;Extended Properties=DBase III"
    
        'name of DBF file here
        Set rs = cn.Execute("Select * from Customers") 
    
    
        MsgBox rs.Fields(1).Value
        
        cn.Close
        
        Set cn = Nothing

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