Yeah, I understand how to create an ado object and use the connections string with an ado connection. I just thought for some odd reason that FoxPro would have native support for the ole db provider.
The reason I am looking at the ole db provider is because I have a stored procedure that I run from crystal reports and I run the same proc from FoxPro. It runs in crystal in about 30 seconds and about 2 mins in FoxPro. I'm not doing anything special I just "exec storedproc p1 p2 p3". I did find out if you do not use the "exec" command before the proc name that sql server will not release the resource until you close the connection.
Do you have any suggestion?
Thanks
Tim
>Hi Tim,
>That's not the way you use ADO in VFP. The article ADO Jumpstart for Microsoft Visual FoxPro Developers by John V. Petersen should get you started
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfoxgen/html/adojump.asp.
>I have tried the following connections string withing foxpro, does anyone know why it is not working or maybe FoxPro does not support sql oledb?
>
>Here is my sample code:
>
>mdhandle= Sqlstringconnect("Provider=SQLOLEDB.1;Password=mypassword;Persist Security Info=True;User ID=myname;Initial Catalog=server1;Data Source=mydata")
>
>Why will the above code not work? The oledb should be much faster than the ODBC driver?
>
--------------------------------------------------------------------------------
--sb--
A computer program will always do what you tell it to do, but rarely what you want to do.
There are 10 types of people: Those who can read binary, and those who can't.
MVP VFP
sergeyb AT isgcom DOT com