Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I execute a VFP Stored Procedure using OLEDB
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00727658
Message ID:
00728572
Views:
17
>>I have a Stored Procedure in a Database called GetKey, which requires a parameter sent of the tablename and will return the next Key that can be used for the primarykey of the table.
>>
>>So I would like to execute that Stored Procedure using the following:
>>
>>oConnection = CreateObject("adodb.connection")
>>oConnection.Provider = 'MSDASQL.1'
>>oConnection.ConnectionString = "Provider=MSDASQL.1;Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=C:\FLASH\CODEBOOK\MASTERWEBSYSTEM\DATA\MASTERWEBSYSTEM.DBC;Pwd=;UID=;"
>>
>>oCommand = CreateObject("adodb.command")
>>oCommand.ActiveConnection = oConnection
>>
>>So my question is what do I need to provide to the oCommand object to execute my Stored Procedure called GetKey (with the table name parameter) and get the key returned to me?
>>
>>Any help would be appreciated.
>
>Oconnection.ConnectionString = "Provider=VFPOLEDB.1 ; Data Source=" & filepath

Thanks, yes that should be VFPOLEDB.1 as I will be trying to get OleDb to work instead of ODBC.

>
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Reply
Map
View

Click here to load this message in the networking platform