>To connect to SQL SERVER 2000, do I still need to use ODBC or can I use OLE DB? & if OLE DB is the recommended driver, how do I convert my VFP 7 application programs from using ODBC to OLE DB?Inge,
You can use either. VFP's SQLCONNECT() and SQLSTRINGCONNECT() assume you are connecting via ODBC. For OLEDB, you would have to make use of the ADO classes (e.g. Connection, RecordSet, Command, etc). To just initiate a connection in ADO, instantiate the ADODB.Connection class and call the Open method passing it the connection string:
oConn = NEWOBJECT("ADODB.Connection")
oConn.Open("<yourconnectionstring>")
Check out
http://www.able-consulting.com/ADO_Conn.htm for examples on what connection strings to use.
Laterness,
Jon
Jon Rosenbaum
Devcon Drummer