0
votes

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?

2

2 Answers

2
votes

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.

0
votes

From within Foxpro you need to use the ADODB connector:

oConn = CREATEOBJECT("ADODB.Connection")
oConn.ConnectionString = "Provider=VFPOLEDB.1;Data Source=C:\temp\;Password="";Collating Sequence=MACHINE;"