Re: Checking to see if a database exists...
- From: "Mike Labosh" <mlabosh@xxxxxxxxxxx>
- Date: Wed, 29 Jun 2005 15:44:00 -0400
> I'm creating databases programatically in .Net and I want to verify that
> the
> database doesn't exist before creating it. i found the SQL code:
IF EXISTS (
SELECT *
FROM Information_Schema.Schemata
WHERE Catalog_Name = 'YourDatabaseName'
)
/* Database Exists */
ELSE
/* Database does not exist */
--
Peace & happy computing,
Mike Labosh, MCSD
"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
.
- References:
- Checking to see if a database exists...
- From: RSH
- Checking to see if a database exists...
- Prev by Date: Re: Directinput
- Next by Date: Check if Stored Procedure already exists in Access Database?
- Previous by thread: Checking to see if a database exists...
- Next by thread: Check if Stored Procedure already exists in Access Database?
- Index(es):
Relevant Pages
|