Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a SQL Server SP as a method of the conn object
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00901367
Message ID:
00901707
Views:
17
Hi Bill, not it doesn't have to be an array, I sent an array as a way to send more than one parameter. However, your code triggers an error message (because of the ? ).

I made some changes to the code and it's now working. Here's my code
cConnString="Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security ;
 Info=False;Initial Catalog=DATA001;Data Source=ENMANUEL"
oConn = CREATEOBJECT("adodb.connection")
oComando =  CREATEOBJECT("AdoDb.Command")
oRS =   CREATEOBJECT("AdoDb.Recordset")

oConn.Connectionstring = cConnString
oConn.Open

lcParam='1,1'
oComando.CommandText="P_pclientes '1','1'"
*oComando.CommandType=4
oComando.ActiveConnection=oConn

oRS = oComando.Execute()

WAIT WINDOW oRS.Fields("establecimiento").Value 
This gave me the desired results. Thanks for your reply,


EGB


>
>does it really need an array ?
>why not
>
>lcparms = '1,1'
>orsResults = oConnection.Execute(?lcparms)
>
>
>lemme know if that works.
> mondo regards [Bill]
I'm a mixture of Albert Einstein and Arnold Schwarzenegger. The only trouble is that I got Einstein's body and Schwarzenegger's brain
Previous
Reply
Map
View

Click here to load this message in the networking platform