I am reading .dbf files using Microsoft ACE OLEDB. I always get the following error when I try to release the application:
path name : could not find file.
However, the process works on the local version. Here is my connection string:
Microsoft.ACE.OLEDB.12.0;Data Source=\"\\\\Sv050r03c01dcp1\\Public\\Groupes\\Dbmgs\\Applications légères\\FiMun\\Données\";Extended Properties=dBase VI;
The permissions on the folder have already been verified. It is server side, can someone give me things to verify on the server?
According to ConnectionString.com the connection string for the ACE.OLEDB should be in the following format,
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\folder;
Extended Properties=dBASE IV;User ID=Admin;
Also, I am not sure if it's a typo but your connection-string's Extended Properties should be IV, not VI. The versions I have heard of are dBase II, dBase III, dBase IV, and dBase 5.
Related
I have a UWP app (which I developed under Win10 Family with Visual Studio 2017 C #) which creates a text file in the myapp \ LocalState directory.
When I want to copy this file to another directory I have a message telling me that the destination does not take encryption into account (normal Win10 family has no encryption capability).
It is as if this file would encrypted. When I try to decrypt with Cipher I have a message "incorrect parameter".
What's this ?
It has always worked properly until now. This is a new problem. Now I have error messages 0x80073CF6 0x80070199 0x80070032 ...
I think there are corrupted files or registers.
I solved my problem by working around.
I store my data files in "Windows.Storage.KnownFolders.PicturesLibrary".
The FoxPro ODBC on my machine is only able to connect to certain tables in the ODBC Connection. When I try to connect to specific tables in the same connection I receive the error [Microsoft][ODBC Visual FoxPro Driver]Not a table.( #123). However, I am successfully connected to other tables without an issue. I know these tables I am unable to connect to aren't corrupted because I am able to view the data in them using Visual Fox Pro.
Any suggestions would be appreciated.
First I'd use the Visual FoxPro OLEDB driver instead of ODBC. It's faster and more fully featured.
Then check whether the TableValidate setting is affecting it. To check that, back up the data then open the table exclusively in Visual FoxPro and issue the following in the command window:
append blank
go bottom
delete
pack
This will append and then delete a blank record, forcing the header counters to be recalculated. Then try it via the connection.
Also try turning tablevalidate off for the OLE DB driver as follows.
Create a text file called CONFIG.FPW in the same location as vfpoledb.dll, on a 64-bit machine this will be in 'C:\Program Files (x86)\Common Files\System\Ole DB'.
In the text file just put one line:
TABLEVALIDATE=0
And retry.
First: Do not use ODBC driver UNLESS your tables are VFP6 and earlier compatible. The last ODBC driver released was only for 6 and earlier. If you still need to use ODBC then check Sybase ADS driver. It is compatible with later versions too and local mode is for free.les
Second:Be sure that the tables you are trying to open are really not corrupted (not a table error is often occurs when the header info is off by pne record = you can check the details on "Not A table" entry on foxwikis. You might be looking into two different files when you check from VFP and through OLEDB driver. You can specify the fullpath to be sure.
After copying the file from an external drive to local hard drive, I got this error and I can't anymore open it:
CoreData: error: (26) Fatal error. The database at BDdata is corrupted. SQLite error code:26, 'file is encrypted or is not a database'
Error: The file couldn’t be opened because it isn’t in the correct format.
Is there anything I can do about it?
A likely reason is that you didn't copy the SQLite journal files. With recent versions of iOS and Mac OS X SQLite uses WAL style journaling. When WAL is used there are multiple files-- your primary SQLite file and two others with the same name but with -wal and -shm added. If you don't copy everything, you don't get a useable SQLite file.
If that's not the case, the file may be corrupt. I don't know why-- what does "manually copied from the operating system" mean? Was the file on iOS or OS X? Did you just drag from one Finder window to another?
If you're planning on copying Core Data store files like this, it's best to change the journal mode back to DELETE, which eliminates the need to copy extra files. You'd do this by including the journal mode as one of the options when adding the persistent store:
NSMutableDictionary *storeOptions = [NSMutableDictionary dictionary];
[storeOptions setObject:#{ #"journal_mode": #"DELETE" } forKey:NSSQLitePragmasOption];
// Add other options
Then use this as the options parameter when calling addPersistentStoreWithType:configuration:URL:options:error:.
I am writing an application in C# (.NET 4.0) which has to integrate with another, much older application. Part of the requirement is that my program must read data from three Btrieve files. I can assume that these Btrieve data files will already exist on the computers where my program is installed, and I can also assume that Pervasive PSQL V9 will also be installed and the relational and transactional service programs are running.
I have the associated DDF files, and I can install them as part of my application. The way they were created I have to put them in a different directory to where the Btrieve data files are. (They have to be a sub-directory of the directory where the data files are).
I didn't know anything about Pervasive or Btrieve when I started, but after a bit of experimentation I have got to the point where I can create a DSN using the 32 bit ODBC administration tool, and I can read from the data files using the ODBC ADO connector. All good so far.
My question is, is it possible to read from these files from my .NET program without having to create an ODBC DSN on the machine? In other words, is it possible to specify the directory where the *.DAT files are and the directory where the *.DDF files are in the ODBC connection string?
I'm not committed to using ODBC, I'm happy to use OLEDB or any other technology that allows me to reliably read from these files using .NET.
While a DSN-less connection allows your to connect without a DSN, you would still need a Database Name. Pervasive Database Names can be created on the fly using DTI or DTO. Using C#, I would suggest DTO.
If you can't create a Database Name, you can use OLEDB. It supports using a path in the Data Source parameter of the connection string as documented in the Remote Connections section of the OLEDB documentation.
One more caveat, make sure to compile your .NET program as x86 and not AnyCPU. The Pervasive OLEDB provider is only 32 bit. If you install your app on a 64 bit Operating System compiled as AnyCPU, it will look for a 64 bit provider and fail.
You should search for DSN-less connection. Instead of passing DSN=mydsn to the connect method (where mydsn is the DSN you set up) you pass DRIVER=xxx (where xxx is the name of the driver) and any other attributes it needs to direct it at the files. There are loads of sites with lists of connection strings for different ODBC drivers so one is bound to list Pervasive if you cannot locate the documentation for your ODBC driver. Another alternative to so look at your DSN in the registry where you'll find the names of the attributes you need to specify.
I need a data store for single-user, read-only access. I need multiple tables, but not related. I also need to do two-column indexing. Seems like Jet is a good choice. Front end will be either VB or C#. The data is not user-entered data, but meta data about users and external files. What are the deployment issues for Jet -is it built into all Windows OS versions from xp onward? I plan on including the Access Database in the resource file.
MS Jet 4.0/DAO 3.6 are part of the operating system and are in Windows 2000, XP, Vista and Windows 7. They are updated by Windows Update and the security patches are applied as appropriate.
Alternatively to including the MDB file in the resource file you could build it if it isn't present. See the TempTables.MDB page at my website which illustrates how to use a temporary MDB in your app.
You can also use the Compare'Em utility
to keep the database files tables, fields, indexes and relationships updated as you upgrade your app.
See why-should-i-use-sqlite-over-a-jet-database, and try both.
The Microsoft Access .mdb driver is included with XP and up. It's part of MDAC.
There are a few other options for this, by the way. Look into SQL Compact, VistaDB, and SQLite.
Be aware that currently there are no 64 bit versions of the JET engine included with the operating systems!
The engines for 64 bit will be available with next Office. Beta can be downloaded from Microsoft Downloads
If you Google this you will see that Jet is no longer a standard part of Windows and has been deprecated. The ACE driver that is now part of Office 2010 does support MDB files, though Microsoft emphasizes that it is not a replacement for Jet. They want you to use SQL Express instead.
You can download and install the ACE driver separately, but note that for no sane reason you can not have the 32 and 64-bit versions of it installed on the same machine. If oyu have Office 2007 32-bit installed and you try and install the 64-bit ACE engine, it gives you this big dialog box that tells you you have to uninstall Office 2007 first.
We switched to sqlite. No more such hassles.
Be careful when using the CSV ODBC driver, there is a bug I discovered.
If you export an MS-Excel file to CSV format, you get double quoted text strings if the text string exported contains double quotes or commas embedded within it.
Example:
"Hello World", This is Eric.
exports as
"""Hello World"", This is Eric."
However, if you read in this data to an ODBC enabled program, then export the data back out, what happens is that the CSV ODBC Driver puts double quotes around text whether the text has embedded double quotes and/or commas, or not.
The huge problem with this is that you cannot run a FILE COMPARE on the original file exported from MS-Excel, and the newly created file (read in then output) from an ODBC enabled program using the CSV driver.
You will always get a FAILED FILE COMPARE (checksum) because the data is not equal. That really screws up QA/QC.
Also, another huge bug exists in ODBC Administrator
whereby you cannot edit the files the Text Driver recognizes/supports.
If you edit that entry, Chinese characters are stored in the Windows Registry. But it is a nice way to parse CSV data via ODBC instead of having to write your own code to strip out the extra Double Quotes.