Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open DBF Table in C# .NET
Message
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01636458
Message ID:
01636547
Views:
76
I would recommend using the OleDb provider not the ODBC driver. As Sergey points out the ODBC driver was old even before VFP was retired. The OleDb driver has better support for simultaneous queries and supports most of the new language features.

However, your real problem is most likely your connection string. You should probably try to make sure it works from FoxPro first.

+++ Rick ---

>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
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform