开发者

Problem loading databases and tables to my application

I am developing an application in C# where i can create and delete databases, create and delete tables, and attach and detach databases.

My problem is when i load the tables of a database to a datatable, my method to get the tables is with "Select * from Information_Schema.Tables", if i do this, and if i try for example to create a database, it gives me an error saying: "Could not 开发者_运维技巧obtain exclusive lock on database 'model'. Retry the operation later.".

If i don't execute the command to get the tables of a database, all works fine, but if i do it, then i can't create or delete databases and do other things, because it gives me errors.

If i try to delete one database it says that it's currently in use.

So I need a solution to this...


sounds to me like you aren't closing/disposing a connection somewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜