LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out our Database and File IO Code Repository Files or visit the LabVIEW Wiki Database and File IO articles.


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> DBF file : database connection
fungiscience
post Feb 21 2007, 05:05 PM
Post #1


Enough LAVA to be dangerous


Member
Posts: 4
Joined: 22-December 06
Member No.: 7350
Using LabVIEW Since:2006
LV:8.0.1 ,8.20 ,.
Canada Nothing Selected Nothing Selected


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?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Feb 21 2007, 05:05 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Yair
post Feb 21 2007, 05:45 PM
Post #2


Extwemely Active
*****

Premium Member
Posts: 1674
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


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 LabVIEW 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.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
fungiscience
post Feb 21 2007, 06:50 PM
Post #3


Enough LAVA to be dangerous


Member
Posts: 4
Joined: 22-December 06
Member No.: 7350
Using LabVIEW Since:2006
LV:8.0.1 ,8.20 ,.
Canada Nothing Selected Nothing Selected


QUOTE (yen @ Feb 21 2007, 12:45 PM) *
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 LabVIEW 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.


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!


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Herbert
post Feb 21 2007, 10:38 PM
Post #4


Very Active
***

NI
Posts: 66
Joined: 19-January 07
From: Austin, TX
Member No.: 7544
Using LabVIEW Since:1999
LV:8.20 ,8.0.1 ,7.1.1
us_texas Germany Nothing Selected


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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Herbert
post Feb 22 2007, 03:12 AM
Post #5


Very Active
***

NI
Posts: 66
Joined: 19-January 07
From: Austin, TX
Member No.: 7544
Using LabVIEW Since:1999
LV:8.20 ,8.0.1 ,7.1.1
us_texas Germany Nothing Selected


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


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
xtaldaz
post Feb 22 2007, 09:12 PM
Post #6


Very Active
***

Member
Posts: 88
Joined: 5-April 04
From: Flagstaff, AZ
Member No.: 342
Using LabVIEW Since:1989
LV:8.2.1 ,8.5 ,7.1.1
United States us_arizona us_utah


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.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
AlanChen
post May 22 2008, 08:03 AM
Post #7


One hit wonder!


Member
Posts: 1
Joined: 22-May 08
Member No.: 11561
Using LabVIEW Since:2008
LV:8.5.1 ,. ,.
Nothing Selected China China


QUOTE (fungiscience @ Feb 21 2007, 06:05 PM) *
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?


Hi,



You may need to replace your dbf file with a backup. If you don't have any backup, I think you can try some repair tools. I have used a tool called Advanced DBF Repair to repair my DBF database. It is a powerful tool and worked well for me, but it is not free, so can be used in the end.




Hope this still can be useful.



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 9th January 2009 - 12:01 AM