Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Userid and Password to Connection
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00025385
Message ID:
00025540
Vues:
33
>Yes you can!
>local lError
>on error lError=.t.
>lConnHandle=SQLCONNECT("upsize")
>on error
>IF lError=.t.
> = MESSAGEBOX('Cannot make connection. Try entering your UserID and Password again.',;
> 16, 'SQL Connect Error')
> ThisForm.txtUserID.SetFocus
>ELSE
> ThisForm.Release
>ENDIF

It almost worked. The error was still displaying. I discovered if I added =DBSETPROP('upsize','connection','DispWarnings',.f.) it works! I can only assume the error I was getting was a 'non-trappable error' and setting DispWarnings to .F. disables display of the error.

Jeff
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform