Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can FoxPro use sql oledb connection string?
Message
De
16/11/2003 23:11:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00850508
Message ID:
00850541
Vues:
16
Okay, either you can't read well tonight or you just did not read my questions? First of all, I told you I already know how to do that. Second, I was trying to find a way to use foxpro's native sqlconnect commands to return the result back into a cursor. Third, I was wondering if the ole db provider was any faster than that of the sqlconnect? Or should I say the odbc connection that foxpro provides. With ado you can use the old odbc connection drivers or the newer ole db provider. B E I N G, that the OLE DB provider is newer and Microsoft claims it to be the fastest SQL database connection available, than way is it not available using the sqlstringconnection function.

If I find out that the ole db provider out proforms foxpro's odbc only provider. Then, It only makes since to which to a more up to date development tool such as .net. Are you understanding any of this?

that all....
Tim

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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform