>>>
>>>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.