>I am trying to open an Access mdb in VFP using ODBC.
>
>The mdb is password-protected and uses some OCX for security.
>
>Here is the shortcut that successfully opens the mdb from the desktop. Without the OCX portion, access is denied.
>
>"C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" "C:\somepath\somedata.mdb" /wrkgrp "C:\somepath
>\SSwsp32.ocx" /user "username" /pwd "password"
>
>QUESTION:
>How can I include this OCX parameter in the ODBC definition so that VFP can open Acces tables as remote views ?
>
>Note: An alternative to the command line is to change a registry setting to use the OCX. Is there a way to do it at the ODBC level ?
Hi Henry;
lcConnectionStr = "DRIVER={Microsoft Access Driver (*.mdb)};" +;
"Dbq=C:\somepath\somedata.mdb;" +;
"Uid=username;" +;
"Pwd=password;"
lnAccess = SQLSTRINGCONNECT(lcConnectionStr)
?SQLEXEC(lnAccess, "INSERT INTO customers (customerId, companyName) VALUES('X0001', 'Customer added through VFP')")
HTH
Merry Christmas!!
Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20