Paradox (*.db) Database Connection

lukec

New Member
Joined
Apr 22, 2002
Messages
11
Hello,
I am trying to connect to, read data from, and edit a Paradox Database from within excel. I am very green and a little confused on how to initiate the connection. Here is what I got:

Code:
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim ConnectionString As String

ConnectionString = "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;" _
    & "Data Source=C:\Program Files\ACI32\Databases\ACI Research\property.db;"
cn.Open ConnectionString

I get an error on the last line. I am assuming my connection string is wrong, but I am not sure. Any help? Greatly appreciated.

~Luke Campbell[/code]
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
In the absence of other replies :-
1. I have not used the ADODB method, so cannot respond to this, except a simple web search shows you need to include something like :-
MyObj= CreateObject("ADODB.Connection")

2. I have always used ODBC. I suggest you record a macro using Data/Get External Data from Excel to get code. Check via Control Panel 'ODBC Data Sources' that you have the Paradox driver installed (a standard content of the MS Office setup disk).

This should enable you to read data. I have no experience of your more interactive requirements eg. writing data.
 
Upvote 0
Thanks for the reply. I actually never got it to work. Instead I created an linked access database to the paradox database. In theory, I could than connect to the access database from excel. However, I have just decideded to write the macro in Access. Just seems to ultimately make more sense.

The idea of importing it with the external data tool is interesting. Unfortuantely I will eventually have to add records to the paradox database, so I don't think this will work. (I did end up using a similar feature in acess to import text files into databases for analysis.) Thanks for taking a shot.

~Luke Campbell

EDIT: Ok, should have read your post more carefully. That idea sounds good. However, I would like to distribute this macro to others once I finish it. I think it would be easier if I don't have to describe how to set up the database connection in the control panel. I think I will try it myself though, out of curiousity.
 
Upvote 0

Forum statistics

Threads
1,214,553
Messages
6,120,184
Members
448,949
Latest member
keycalinc

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top