Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Database

Status
Not open for further replies.

Saama5

Programmer
Jan 6, 2002
52
US
Can Createdatabase be part of BeginTrans in ADo and if while importing records from other database fails it should not createdatabase also.
I tried it seperately also if import fails then it should deletedatabase so sometimes it removes and sometimes it says it is in use so it fails.
 
You cannot enclose CREATE or DROP statments inside a user-defined transaction. At least the transaction won't rollback those statements in case of failure.

The failure of the DROP database statement after the import fails is likely due to the database being used by your application. Try executing a Use master (or other database) statement before issuing the drop statement. That will cause the database context to change and should allow the drop. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top