Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Provider Independent: Excel & VFP - what to do with byte[]
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Provider Independent: Excel & VFP - what to do with byte[]
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01220248
Message ID:
01220248
Vues:
84
I'm continuing with my attempt to make my application Provider Independent.

I have two versions of my database: VFP (the main version), and Excel (a derived version).

The VFP database is really the main database, but sometimes users will work with a subset of its tables in an Excel workbook.

I'm used OleDb to interact with both of these using Ole DB Provider for Visual FoxPro, and Microsoft Jet 4.0 OLE DB Provider for the Excel 2003 workbook.

My problem: one field in the VFP table is a datatype "General". This contains a reference to an OLE object. The wizards in VS2005 that create the table give this column a byte [] type. Ole Db has no trouble importing data from this VFP table. However, I can't figure out how to construct an equivalent Excel table with a column that can be imported with the same code. I keep getting an "Inconvertible type mismatch between the SourceColumn in the Excel spreadsheet, and the data table column which has type Byte[].

I have even tried to create the Excel table by importing the VFP table. That copies everything in the VFP table except the column with the General format.

Presumably the Byte [] datum is a pointer, a 32-bit Integer. Certainly Excel can store that, but how do I clear up the data type mismatch?

Thanks,
Jim
Répondre
Fil
Voir

Click here to load this message in the networking platform