Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to suppress ODBC client driver error dialogs?
Message
From
13/02/2016 03:42:47
 
 
To
12/02/2016 01:49:06
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Virtual environment:
VirtualBox
Miscellaneous
Thread ID:
01631344
Message ID:
01631420
Views:
56
>>>
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform