Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can FoxPro use sql oledb connection string?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00850508
Message ID:
00850520
Views:
19
Hi Tim,

Here's how you can call stored procedure using ADO
LOCAL oCon AS ADODB.connection, ;
	oCmd AS ADODB.Command
lcConStr = < connection string >
oCon = CreateObject("ADODB.connection")
oCmd = CreateObject("ADODB.Command")
oCon.ConnectionString = lcConStr
oCon.Open(, "myusername ", "mypassword")
oCmd.ActiveConnection = oCon
oCmd.CommandType = adCmdStoredProc
oCmd.CommandText = [mysproc p1, p2, p3]
oCmd.Execute()
>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?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform