Search code examples
visual-studio-2013datasetvisual-foxprooledbconnectiondbase

VBOLEDB data connection not recognizing all the .DBF files


I'm using Visual Studio 2013 and I'm trying to import some .DBF database files into a dataset. I'm using the OLE DB FoxPro Data Source Provider and it does work, it just will not load all the .DBF files using the Data Connection so that I can choose which files to add as tables in my dataset. It's as if it doesn't even see them. I cannot use an ODBC connection because it crashes Visual Studios every single time for whatever reason. However, when I add it as an ODBC connection, it does recognize all the files like it is supposed to. I just can't use them or it will crash. I've been working on this for days, so please help! It will not allow me to add these files using the Microsoft Jet 4.0 either.


Solution

  • Without seeing your connection string, I can only suggest posting it. However, I would also preemptively guess that your connection string is pointing to a specific .DBF file which connects to a single table.

    Your connection should point to the LOGICAL DRIVE / PATH and not explicitly name a .dbf file.

    The other possibility is that if the files are part of a database CONTAINER (via .DBC file extension), then you should be able to query and table in the database container.

    What MAY be failing is if the table is part of a database container, and it has long column names beyond the 10 characters of the older / free-form table formats, that MIGHT be preventing querying for that reason.

    Let's see your connection information as best as you can without any possible id/password information.