Jump to content

DBF file : database connection


Recommended Posts

Hello,

I try to connect to a DBF File (a dBase file which is supposed to be supported by the LabVIEW Database Connectivity Toolkit) using the LabVIEW Database Connectivity Toolkit. I always get an error when I supply the Open Connection VI with the DSN, or the file path or when I configure manually the dialog with Microsoft JET 4.0 OLE DB Provider and the file path to the dbf file (The test connection doesn't work either).

Here is the error from the dialog Test connection button :

Test connection failed because of an error in initializing provider. Unrecognised database format

Here is the error when a supply the file path in input :

Error 1 occurred at DB Tools Open Connec (Path).vi->MEPR-Query Database-Get data.vi

Possible reason(s):

The file provided is not a data link (UDL) or a file DSN.

Any tips?

Link to comment

I don't have any experience with this file type, but if the Test Connection button fails, how do you expect LabVIEW to be able to use the connection? All LV does is call the ADO methods which use this connection. You have to get the Test Connection button to return a successful connection before you can proceed.

Is the DB on another computer?

Are you defining the connection correctly (username, etc.)?

Is it possible there is something corrupted with the DB file?

And so on?

You might want to search Google for problem related to connections to dBase DBs.

Link to comment

QUOTE(yen @ Feb 21 2007, 12:45 PM)

Yes the DB is originally on another computer, but i copied the DBF file on the local computer. It<s not corrupted, I can open it with Microsoft Access. The connection is defined correctly as well!

QUOTE(fungiscience @ Feb 21 2007, 01:30 PM)

Yes the DB is originally on another computer, but i copied the DBF file on the local computer. It<s not corrupted, I can open it with Microsoft Access. The connection is defined correctly as well!

Actually, it just seems to me that LabVIEW Database Connectivity Toolkit doesn't provide access to dBase DBF files. First, when you browse for database file, using the dialog prompt from the Open Connection VI, only Microsoft Access database files (.mdb) is defined in the dropdown list. Second, my database file is consistent and working : I can access it from Microsoft Access easily. And the Test connection button tells me : Unrecognised database format...which brings me to the conclusion that this file type isn't supported!

Link to comment

You might need to play with the connection string. This website has a comprehensive collection of sample connection strings: http://www.carlprothman.net/Default.aspx?tabid=81.

The connection string for Jet 4.0 has an optional part called "Extended Properties" that can be used to specify file types other than mdb, plus the parameters needed to open these files. I think it is sufficient to just include "Extended Properties=DBASE III" or "Extended Properties=DBASE IV" with your connection string.

Worst case this might work for you.

Hope that helps,

Herbert

Link to comment

On further investigation, you might need to have ISAM support installed. MSDN recommends getting it from Borland (link), but there are 3rd party providers, too. That obviously does not solve the mystery of why MS Access can read dBase without having ISAM installed.

If you use the dialog for configuring your "Microsoft Data Link" and you select Jet 4.0 and your DBF file, then test the connection, the error will say "[..] Unrecognized Database Format [...]". Now, go to the "All" tab of the dialog and pick "Extended Properties", click on "Edit Value..." and put in the specifier for the dBase version you are using. Now, go back to the "Connection" tab and press "Test Connection" and it will lament the absence of an ISAM component.

Why are you using dbase anyway? Supporting legacy software? Let us know if you get it up and running ...

Herbert

Link to comment

When I was at NI and responsible for the Database Connectivity Toolkit, I did test it with dBase and DBF files. Everything worked fine and if there were any problems connecting, they weren't significant enough for me to remember or write down. I actually used dBase in some of my presentations because all the shipping examples worked with Access and I liked showing other database management systems for contrast.

I'm sorry I don't remember more, but you can be assured the toolkit works with dBase files. I know it's old technology and I usually don't recommend it, but try ODBC to connect instead of the Microsoft Data Link. This might bypass some of the MS drivers and possibly some of the ISAM business Herbert mentions.

Link to comment
  • 1 year later...
  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.