On Tue, May 31, 2016 at 11:33 AM, Paul Newton Paul.Newton@pegasus.co.uk wrote:
nConnectionHandle = SQLStringConnect(cConnectionString) Assert .F.
In the debugger Watch window nConnectionHandle shows with value 1 If I check SQLGetProp(1,"ConnectString") it shows expression cannot be evaluated
If do another SQLStringConnect in the command window, nConnectionHandle still shows as 1 but now SQLGetProp(1,"ConnectString") shows the connection string I used.
When you do the second SQLStringConnect, are you using the explicit cConnectionString, or are you typing out the connection string again?
I'd check the value of cConnectionString in the debugger and see if there's a typo.
Check your error handler to ensure you're not suppressing the error by mistake.
There's also a global setting for SQLStringConnect to raise or suppress errors,
SQLSetProp(0, "DispWarnings", .T.)
Note that Zero for the first parameter sets the setting globally.
Reference: https://msdn.microsoft.com/en-us/library/dtytxez4(v=vs.80).aspx
It _seems_ as if SQLStringConnect is returning 1 even though in fact a connection has not been established Any ideas would be very much appreciated as I have wasted a lot of time on this so far
Many thanks
Paul Newton
[excessive quoting removed by server]