Olaf Doschke
Programmer
An application I maintin is making several default settings for SQL connections by SQLSETPROP() calls for handle=0, as follows:
This fails on the line about the Transactions setting with ERROR 1541 (the message is "Connection #0 is busy"). How could that be? There is no real connection, this is all just setting defaults.
It is done repeatedly, which I could change to once at init, but it always and only fails on the Transactions line.
OS is Windows Server 2012 R2 (Datacenter) 64bit, if it matters. And it's a used as a Terminal Server.
I will try to simply remove the line, as 1 (automatic) is the default setting for transactions anyway. But I'd like to know why that could cause error 1541 and make sure the error will also never happen for any other setting.
By the way, this is another of those errors not having occured earlier, although this code is used for several years now, previously in Vista/7/8 clients and on 2008 Servers. It happens reproducable now.
Bye, Olaf.
Code:
=SQLSETPROP(0, "Asynchron", .F. )
=SQLSETPROP(0, "DispWarnings", .F. )
=SQLSETPROP(0, "BatchMode", .T. )
=SQLSETPROP(0, "Transactions", 1 )
=SQLSETPROP(0, "DispLogin", 1 )
=SQLSETPROP(0, "ConnectTimeOut", 15 )
=SQLSETPROP(0, "IdleTimeOut", 0 )
=SQLSETPROP(0, "QueryTimeOut", 0 )
=SQLSETPROP(0, "WaitTime", 100 )
This fails on the line about the Transactions setting with ERROR 1541 (the message is "Connection #0 is busy"). How could that be? There is no real connection, this is all just setting defaults.
It is done repeatedly, which I could change to once at init, but it always and only fails on the Transactions line.
OS is Windows Server 2012 R2 (Datacenter) 64bit, if it matters. And it's a used as a Terminal Server.
I will try to simply remove the line, as 1 (automatic) is the default setting for transactions anyway. But I'd like to know why that could cause error 1541 and make sure the error will also never happen for any other setting.
By the way, this is another of those errors not having occured earlier, although this code is used for several years now, previously in Vista/7/8 clients and on 2008 Servers. It happens reproducable now.
Bye, Olaf.