Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I'm not receiving parameters from SQL stored Procedure
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00495791
Message ID:
00496082
Views:
10
It looks correct. What is the error you get when you use the SQLExec?

>I'm having a problem connecting to a Remotes SQL connection from one ogf our provider. I must receive three parameters but I'm not receiving any value (some times I receive starnge characters) using VFP, but if I use the same string with the SQL query Analyzer a get the correct values.
>P1x,p2x,p3x are parameters the return values.
>
>The following is my code
>
>
>nHost=SQLCONNECT("myserver","Uid","pass")
>IF nHost>0
> p1x=" "
> p2x=DATETIME()
> p3x=" "
> lcstring="Execute EDB_sp_fu_Sale 'O','10660000023','0000004578 ','A9999 ','NY',"+;
> "'04/01/2001 10:29:12 AM','9',' ','MX ','MXP',' 110.00',"+;
> "' 100.00',' 15.5500',' 10.00','DORA ','DILONE ',"+;
> "' ','4425 14TH ST. N.W. 44 ',' ',"+;
> "'DC ',' ','20011 ','2025180773 ','KENDRA ',"+;
> "'CABRERA ','N/A ',"+;
> "'CALLE INTERIOR A 5 LA FERIA ',"+;
> "'SANTO DOMINGO ',' ','REP',"+;
> "' ','8095361568 ',' ',' ',' ',"+;
> "' ',' ',"+;
> "?@p1x,?@p2x,?@p3x"
>
> ErrorHandler = SQLExec(nHost, lcstring)
>
> ?"p1="+p1x
> ?"p3="+p3x
>
> IF ErrorHandler >= 0
> lcRetString = TRIM(p1x) +","+ TRIM(TTOC(p2x)) +","+ TRIM(p3x)
> ELSE
> ?"--Error--"
> errhand()
> ENDIF
>ENDIF
>
>Also I'm try to do:
>con=Createobject("adodb.connection)
>rs= Createobject("adodb.recordset")
>con.open(("myserver","Uid","pass")
>
>rs=con.execute(lcstring,'',1)
>
>But I receive Count Field Incorrect.
>
>Some body can point me to the best way to do that?. Is there some clue with VFP?.
>I'm using the same string in the query analizer and it' working ok.
>Any help. Tnanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform