Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set up data connection for VFP from C#
Message
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01082681
Message ID:
01082870
Views:
11
I registered the VFPOLEDB.DLL file by using the RUN...CMD prompt as follows:
regsvr32 "C:\Program Files\Common Files\System\Ole DB\vfpoledb.dll"
I also did all of the below, and yet when I go into the C# IDE, and want to add a new datasource, I still do NOT see any other choices for data sources other than ACCESS and SQL Server. How do you make it automatic that a new option for Visual FoxPro will display automatically just as MS ACCESS and SQL SERVER do?

Cecil

Argument Description:
Provider = Specifies the name of a provider to use for the connection.
File Name = Specifies the name of a provider-specific file (for example, a persisted data source object) containing preset connection information.
Remote Provider = Specifies the name of a provider to use when opening a client-side connection. (Remote Data Service only.)
Remote Server = Specifies the path name of the server to use when opening a client-side connection. (Remote Data Service only.)
URL = Specifies the connection string as an absolute URL identifying a resource, such as a file or directory.


How do I get the Connection String needed to use Ole DB?

Create a dummy empty file
Using something like Notepad
Or on the desktop with New / Text File
Rename the file, changing it's extension to ".UDL"
Double-click on this new file
Fill in the Ole DB dialog that appears
Select the Provider (you should see Microsoft OLEDB Provider for Visual FoxPro, among others)

Fill in the information in Connection
Test the connection
Close and save
Open the newly created UDL file and you will see the connection string that you can cut and paste into your programs

-- Alex Feldstein
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform