Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP datetime used as parameter for SPT to SQL Server Pro
Message
 
 
À
01/02/2001 20:32:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00471561
Message ID:
00471724
Vues:
22
Gar,
Just looking at your post, you never initialize d1 and d2. It may be a typo but you should be passing in references to ln_bdate and ln_edate. If that's not it then what are @bdate and @edate declared as in your SP? Also, as Vlad posted, what error(s) is/are returned when you issue an aerror() after sqlexec returns -1? This will help a lot in the debugging.

HTH.

>I have a stored procedure in SQL Server 7 that incluses a select statement along the lines of SELECT * FROM table WHERE date_add >= @bdate and date_add <= @edate. @bdate and @edate are datetime parmaters to this procedure.
>
>The following SPT works fine:
>
>ln_return=SQLEXEC(ln_handle, "myproc '01/01/2001','01/01/2001'")
>*Note yes I should give it better strings -- but for teting purposes these work
>*fine.
>*ln_return=1
>*And I do indeed get one sqlresult cursor
>
>*This following fails
>ln_bdate=datetime()
>ln_edate=datetime()
>ln_return=SQLEXEC(ln_handle, "myproc ?d1,?d2")
>*ln_return = -1 meaning an error
>* and of course I get no results cursors
>* Is this an ODBC problem? A UFU on my part? Help!
>*
Larry Miller
MCSD
LWMiller3@verizon.net

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

Click here to load this message in the networking platform