Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open DBF Table in C# .NET
Message
De
16/05/2016 18:19:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01636458
Message ID:
01636461
Vues:
98
>Hi friends,
>
>I need to open a VFP9 free table (DBF) in C # .NET.
>
>I'm trying via ODBC but is presenting the msg:
>
>ERROR [IM002] [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified
>
>My font:
>
>public static DataTable GetDataTableDBF(string strFileName)
> {
> System.Data.Odbc.OdbcConnection conn = new System.Data.Odbc.OdbcConnection( "Driver={testdbf};SourceType=DBF;SourceDB=c:\\windows\\syswow64\\;Exclusive=No");
>
>
> conn.Open(); // The error is here
>
> }
>
>Can someone help me ?
>
>Thanks in advance,
>
>[]´s
>
>Dionísio

Shouldn't the Driver parameter in the connection string be "Driver={Microsoft Visual FoxPro Driver}"? Also, I assume your application is 32-bit, so you can call a 32-bit data driver.
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform