Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WestWind/database filter help
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01516279
Message ID:
01520596
Vues:
83
>
>>
>
>>usr = ""
>>pas = ""
>>ConnStr = [driver=SQL Server; server=]+THESERVER+[; database=]+THESQLDB+[; uid=]+usr+[;pwd=]+pas+[; Trusted_Connection=No;]
>>curHandle2 = SQLstringCONNECT( connStr )
>>cmd2 = [exec InTransitRNStatus ?']+fdBlNo+[']
>>lr2 = SQLEXEC( curHandle2, cmd2, "sq2")  && sq is the cursor the data is loaded into
>
>
>
>Check the result code from the SQLEXEC - if it's < 0 the query is failing. Use AERROR to get the error message. Is it safe to assume in the real code that usr and pas aren't empty strings?


Not sure I know how to check the result from SQLEXEC but I'll see if I can figure it out. I think something like this:
IF SQLEXEC( curHandle, cmd, "sq")  = -1
messagebox(message())
ENDIF
And you are correct, usr and pas aren't empty, I just didn't want to have the login info to the database online.


EDIT: Yep, got an error saying the SP had no parameters but an argument was supplied. I probably need to add the bol_number to the SP.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform