How to use vfpoledb

oledbvisual-foxpro

I have installed vfpoledb I am running it against VFP 8 tables. When I execute the command

connection = SQLSTRINGCONNECT([Provider=vfpoledb;Data Source=C:\temp\;Collating Sequence=general;])

I get a popup dialog with SELECT DATA SOURCE

I am trying to use the connection string specified here http://www.connectionstrings.com/visual-foxpro#89 where I want access to free tables using OLEDB. I can connect using an ODBC connection string.

Am I using it correctly?

Best Answer

You don't specify the language you are trying to build against. Here's another link of an instance using OleDB to connect to VFP Tables

It may not be a perfect match, but does show how to properly create an OleDB connection to the path where the VFP data exists, and perform a SQL-Insert using parameterized queries (prevent sql injection), and attempting to pack/delete from too.

Once you get the basic connection down, and basics on parameterizing queries, your queries can be like almost any other VFP SQL-Select, Update, Delete query.

Related Topic