Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a SQL stored Procedure doesn't return values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00494591
Message ID:
00494599
Vues:
24
Juan,
Can you post part of the SP declaration (e.g. parameter declarations, code that sets the values) as well?

>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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform