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