# Connecting to Visual FoxPro Database (.DBC File)

**URL:** <https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531>\
**Category:** Ignition\
**Created:** [January 19, 2011, 8:29pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531 "2011-01-19T20:29:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cas](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Cas](https://forum.inductiveautomation.com/u/Cas)\
**Post date:** [January 19, 2011, 8:29pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/1 "2011-01-19T20:29:14Z")

</div>

Our production database is done in Visual Foxpro (I am told the database file has a .DBC extension).  
Has anyone gone through the steps to connect to that type of a database? Do I need to use the ODBC-JDBC bridge that comes with Ignition? I see there are 3rd party JDBC drivers for Visual FoxPro (see [csv-jdbc.com](http://www.csv-jdbc.com) for a JDBC driver for DBF files?? ) - does something like this make any sense?

Unfortunately I am not a DBA and have very limited knowledge of database connections (everything I have learned was so I could get FactorySQL and Factory PMI to work, lol). Please don’t assume I will understand any technobabble. 🙂

If anyone can give me a dumbed-down step-by-step process on how to build a new JDBC driver, implement a 3rd party one, or tell me how to do this some other way I would be eternally grateful.

Thanks,  
Cas

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [January 19, 2011, 9:03pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/2 "2011-01-19T21:03:01Z")

</div>

I would try to get that “StelsDBF” JDBC driver to work. You should be able to download it (as a zip file) and then extract the “dbfdriver.jar” file.

Upload this as a new Database driver in Ignition. The driver’s classname is “[tt]jstels.jdbc.dbf.DBFDriver[/tt]”  
The URL format is something like this: “[tt]jdbc:jstels:dbf:c:/mydir/dbffiles[/tt]”

See [their docs](http://www.csv-jdbc.com/stels_dbf/doc.htm) for more information (thats where I got all this info from)

I would try to get this route going before I fell back on the JDBC-ODBC bridge.

---

<div class="post-metadata">

**Author:** ![Cas](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Cas](https://forum.inductiveautomation.com/u/Cas)\
**Post date:** [February 2, 2011, 9:25pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/3 "2011-02-02T21:25:37Z")

</div>

This is just a follow-up for anyone who may be faced with the same issue.  
I was able to get the JStels JBDC driver to work, and get a good data connection to our FoxPro database tables.  
The steps were essentially:  
[ol]  
[li] Download the evaluation copy of the DBF driver from [http://www.csv-jdbc.com](http://www.csv-jdbc.com)[/li]  
[li] Extract the .jar file into some location on your computer (the other jdbc drivers in Ignition are in this folder: C:\Program Files (x86)\Inductive Automation\Ignition\contexts\main\jdbc)[/li]  
[li]In the Configure \> Database \> Drivers link of the Ignition Gateway, enter this into the Classname field with no parentheses: (jstels.jdbc.dbf.DBFDriver)[/li]  
[li]Upload your .jar file[/li]  
[li]Enter the URL Format. This will depend upon where the DBF files are. If they are on the same computer as Ignition, in a folder called, say, “C:\IATest” then enter with no parentheses (jdbc:jstels:dbf:c:/IATest). In my case, the database was on another server computer that was shared on our corporate LAN. In that case, I had to use the following syntax with no parentheses: (jdbc:jstels:dbf:cache://smb://admin:adminPW@ServerName/Shared\_Folder\_Filepath). In this case, you need to know the name of the admin user profile and the associated password. Put those in where “admin:adminPW” are. Then the @ sign and then the filepath of the folder in the shared location.[/li]  
[li]In the Default Validation Query Field, enter something like: (SELECT \* FROM “dbf.dbf”) and make sure there’s a file actually called dbf.dbf, or whatever filename you use. And yes, use the double quotes in the syntax.[/li]  
[li]Save that & then go to Configure \> Database \> Connections link in Ignition Gateway. Open a new connection and insert the same URL Format as was in step 5 above.[/li]  
[li]Check “Show Advanced Properties” and change Initial Size, Max Active, Max Idle, and Min Idle to 1 for all entries.[/li]  
[li]Save and cross your fingers. If the Connection is Faulted, you may get a clue by clicking on the Database Connection Status link. If not, the tech support at [support@csv-jdbc.com](mailto:support@csv-jdbc.com) is almost as good as Inductive Automation’s tech support.[/li][/ol]

Good luck!  
Cas

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 2, 2011, 11:08pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/4 "2011-02-02T23:08:57Z")

</div>

Awesome - I’m glad you got it working. Thanks for posting back with the steps, that’s very helpful!

---

<div class="post-metadata">

**Author:** ![LEGARCIA](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@LEGARCIA](https://forum.inductiveautomation.com/u/LEGARCIA)\
**Post date:** [June 25, 2014, 12:33am UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/5 "2014-06-25T00:33:10Z")

</div>

I just registered to say

THANK YOU FOR DOCUMENTING YOUR EXPERIENCE…

I ended up paying the 180 + tax dollars and switched from ODBC bridge to straight JDBC VFP DB access and the nightmare is gone.

God bless you.

LE+

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [February 12, 2018, 9:58am UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/6 "2018-02-12T09:58:49Z")

</div>

A few years later, I also became a victim to connect with a FoxPro database.

I’ve meanwhile found a driver combination that’s a bit stable, using the RMI connection to a locally installed JDBC driver from [sesamesoftware](http://sesamesoftware.com/relational-junction/jdbc-database-drivers-products/relational-junction-dbf-jdbc-driver/relational-junction-dbf-file-jdbc-driver-documentation) (the site you go to when you follow the old link to csv-jdbc).

However, I still have problems with the character encoding. The text in the console should be “lumière”, but it ends up with a strange S (same as in the interface). So it appears that the è is encoded as 0x8a, which would point to IBM437 being used as I found on [stackoverflow](https://stackoverflow.com/questions/2700794/what-character-encoding-is-this).

The driver offers the ability to alter the encoding, however, it appears that the IBM437 encoding is no [standard encoding](https://docs.oracle.com/javase/1.5.0/docs/guide/intl/encoding.doc.html). What would be the best option to display the accents correctly?

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/032304c3a7ad7eb4f87de7c20becd0508aa65c65.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 12, 2018, 4:03pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/7 "2018-02-12T16:03:55Z")

</div>

OT: Ah, memories! I was a heavy user of FoxPro back in the pre-Windows days. I even have a Fox Software coffee mug from back then. Microsoft bought them out to gain control of their DB engine (Jet), which became the foundation of MS Access.

---

<div class="post-metadata">

**Author:** ![Cas](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Cas](https://forum.inductiveautomation.com/u/Cas)\
**Post date:** [February 3, 2019, 11:17pm UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/8 "2019-02-03T23:17:52Z")

</div>

Hi Sanderd17,  
I see your message is a year old and I’m afraid I don’t have an answer… but was the Sesame tech support useful to you at all?

FWIW, I recently found myself needing this driver again so I’ll be posting an update soon.  
Cas

---

<div class="post-metadata">

**Author:** ![Cas](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Cas](https://forum.inductiveautomation.com/u/Cas)\
**Post date:** [February 4, 2019, 12:18am UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/9 "2019-02-04T00:18:24Z")

</div>

All,  
Here’s an updated post about this DBF driver. Hope it helps one or two more people.  
[http://forum.inductiveautomation.com/t/jdbc-driver-for-dbf-files-sesame-software/22311](http://forum.inductiveautomation.com/t/jdbc-driver-for-dbf-files-sesame-software/22311)

Happy programming!  
Cas

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [February 4, 2019, 7:08am UTC](https://forum.inductiveautomation.com/t/connecting-to-visual-foxpro-database-dbc-file/2531/10 "2019-02-04T07:08:07Z")

</div>

Yes, the driver worked, but we had big performance issues with it. Whenever we wanted to write to the DB, apparently a bunch of files got locked. This in turn caused the reads to time out, which seemed to cause repeated cache invalidation, until everything got stuck.

At the moment, we only read from the DBF files, reporting back to it is done manually via the old VFP interface.
