Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP datetime used as parameter for SPT to SQL Server Pro
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00471561
Message ID:
00472346
Vues:
34
Have you examined what is being stored in d1 and d2 (I assume you set these to the values of ln_bdate and ln_edate somewhere) and made sure that it is in the correct format for the procedure call (i.e. it hasn't got trailing seconds)? Have you converted it to a string - datetime returns a T(ime) but you will need to pass a C(har). You might want to try dtoc(datetime()). After that, what was the error code resulting from the SQLExec code?




>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!
>*
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform