简体   繁体   中英

Does Microsoft Jet 4.0 support 64bit integers?

I have a csv file that I'm trying to import into a Sybase SQL Anywhere database using the SABulkCopy (Sybase's version of SQLBulkCopy) class in C# .NET. The csv file's first column maps to a 64bit integer primary key value in the Sybase DB. There is also binary data (larger than 510 bytes) in one of the columns as well. Using Jet 4.0 OleDB to access the csv file may not be the best way of doing a bulk insert, but I don't know of another way to get this done using a csv source file. The whole point of this is to avoid writing all of the inserts to the log, as the blob data is expendable but needs to be imported in a quick fashion. I'm using a schema.ini file to map the datatypes in the csv file, the problem is that the "Long" datatype is only for 32bit integers. This causes an error when I feed the OleDB DataReader to SABulkCopy.WriteToServer() since the DB expects a 64bit integer, not a 32bit one.

You can't do this using Jet 4.0, but you don't need to. You can get the 64-bit Access Engine redistributable at http://www.microsoft.com/en-us/download/details.aspx?id=13255 . You'll also need to update your connection string 'Provider' to "Microsoft.ACE.OLEDB.12.0".

If using a separately installed engine is not possible, you can always do a simple file read and parse out the data like this .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM