Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a SQL stored Procedure doesn't return values
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Calling a SQL stored Procedure doesn't return values
Miscellaneous
Thread ID:
00494591
Message ID:
00494591
Views:
70
I need to make a remote SQL connection with a provider, call a stored procedure and receive 3 returned values.
I'm not receiving returned values in paraoutput1x,paraoutput2x,paraoutput3x (parameters by reference) or sometimes I receive strange characters and sometimes I receive a substr of the lcstring .
The provider says that is a problem with my code, because they have other customers working ok.
What I'm missing? could be someting with my ODBC connection configuration?.

Any help thanks!

My code looks like:
clear
nHost=SQLCONNECT("SQLconnection","ID","PASS")
If nhost>0

STORE SPACE (4) TO paraoutput1x
STORE datetime() TO paraoutput2x
STORE SPACE (255) TO paraoutput3x


lcstring="Execute EDB_sp_fu_Sale 'O','10660000023','0000004577 ','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 ',' ',' ',' ',"+;
"' ',' ',"+;
"?@Paraoutput1x,?@ParaOutput2x,?@ParaOutput3x"

_CLIPTEXT=lcstring
ErrorHandler = SQLExec(nHost, lcstring)


?"paraoutput1x="+paraoutput1x
?"paraoutput3x="+paraoutput3x

IF ErrorHandler >= 0
lcRetString = TRIM(paraoutput1x) +","+ TRIM(ttoc(paraoutput2x)) +","+ TRIM(paraoutput3x)
ENDIF
endif
"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