Page 1 of 1

how to drop database correctly with sdac ?

Posted: Sat 26 Oct 2019 13:03
Hello,
with ADO I can do this:
.
//some work with database "test" connected here and then I can do this
adocon.Execute('use master');
adocon.Execute('drop database test');
//database test dropped correctly

with sdac:
//some work with database "test" here and then
sdaccon.ExecSQL('use master');
sdaccon.ExecSQL('drop database test');<--- exception here :"cannot drop database test because database in use..."
//of course database test is not connected with other connection.
// how to drop database with sdac here ?
- i tried disconnect and then connect before, but without succes:
- I tried set property sdaccon.multipleconnection to false, without success

I'm sorry for maybe stupid questions, just getting started with sdac,

thank you.

Re: how to drop database correctly with sdac ?

Posted: Sat 26 Oct 2019 17:36
I found a problem, i apologize to sdac, problem causes ADO, if property adoconnection.keepconnection is set to true, then adoconnection holds database for many seconds after call adoconnection.close. the problem was due to testing ADO+SDAC within one program. So it It's my fault. sorry..

Re: how to drop database correctly with sdac ?

Posted: Mon 28 Oct 2019 10:52
by Stellar
Glad to see that the issue was resolved.
Feel free to contact us if you have any further questions about our products.