Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to suppress ODBC client driver error dialogs?
Message
De
13/02/2016 03:42:47
 
 
À
12/02/2016 01:49:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Virtual environment:
VirtualBox
Divers
Thread ID:
01631344
Message ID:
01631420
Vues:
55
>>>
>>>sqlsetprop(0, 'DispLogin', 3)
>>>sqlsetprop(0, 'DispWarnings', .f.)
>>>
>>
>>Thanks, Hugo - that's what I was looking for. The important thing to note (for me) was 0 as the first parameter of the calls - from Help: "To specify Visual FoxPro default settings at the environment level, include 0 as the statement handle." This lets the function work *before* a connection is (not) made.
>>
>>UPDATE: for lurkers - on a failure of SQLSTRINGCONNECT(), AERROR() contains all the information in the first dialog of my initial post (plus more).
>
>That's actually true of any sql* call, aError() will return whatever the ODBC driver complains about (which is mostly passing the messages from SQL server).
>
>BTW, one thing which isn't widely known - I've seen a few old foxen who didn't know this, is the nature of the number returned by sqlexec() containing a select statement, or more statements. It's the number of cursors it returns. Which is not quite correct - in case it returns no cursors (like when you pass an empty string or just sqlexec(h, "/* comment */", "xx") then the result is still 1. But if it returns more than 1, that's what it is.

99% software designers are struggling with the contingent operations.
A wide vision, which maintains overall consistency
of full application, it is from a few whiteflies.
The Gaussian human capacity evolves very slowly.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform