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
Title:
I'm not receiving parameters from SQL stored Procedure
Miscellaneous
Thread ID:
00495791
Message ID:
00495791
Views:
74
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.
"Anyone who has never made a mistake has never tried anything new." A.E
"The important thing is not to stop questioning. Curiosity has its own reason for existing." A.E
Next
Reply
Map
View

Click here to load this message in the networking platform