Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2004, 07:52 PM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to drop the database

when i want to drop the database,the exception says that the
database is in use.but i check the connection state of the
database is close.So how to drop a database when the database is
in use by some thread?

 
Old June 5th, 2004, 10:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

dear friend: If u gonna drop ur DB from a program ensure its in use since u r connected to that! Perhabs u use an Adpter. When a software connect to DB it keeps connection till u quit the software, even see connection state is close!

HTH.

Always:),
Hovik Melkomian.
 
Old June 7th, 2004, 01:31 AM
Registered User
 
Join Date: Jun 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes,at first the database can be dropped,but after i read or
write to the database(of course i have close the connectioin)
the database can't be dropped

 
Old June 9th, 2004, 11:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

dear friend if u think when u close ur DB-Conn its closed completely open a Profiler & test it. When u close still u have connection in ur profiler.

HTH.
I guess u can NOT Drop ur DB by App. & if its true, its good bc no1 is crasy (I dont mean anything) to drop DB by a App. u can do it Directly in DB side.

Always:),
Hovik Melkomian.
 
Old June 15th, 2004, 09:39 PM
Kep Kep is offline
Authorized User
 
Join Date: Aug 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What sort of database are you trying to drop?
 
Old June 16th, 2004, 04:18 PM
tnd tnd is offline
Authorized User
 
Join Date: Jun 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What do you mean by dropping the db? Are you trying to drop the connection or the database (ie delete it from the server?)

If you are doing the latter, then it probably failed because your drop db command requires an active connection to the db. You need to switch to another db before you can drop the db from the server.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a drop down list using database values erinrox JSP Basics 1 September 4th, 2007 06:59 AM
Database/Drop Down list help jackiew Classic ASP Databases 4 July 30th, 2007 03:48 PM
Database driven drop down rajneesh Classic ASP Professional 3 May 5th, 2007 01:39 AM
run database query when drop-down is selected crmpicco Classic ASP Basics 4 August 9th, 2005 12:28 PM
Populate a drop down from database topshed Access 5 November 29th, 2004 09:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.