Re: Database creation

"Mark A. Gregory" <[email protected]> Tue, 18 Jun 2002 21:55:47 +1000
Newsgroups gmane.comp.windows.devel.oledb.devel
Message-ID <[email protected]>
I created a database and then a script from it

I would like to know how to identify where to put the data and log files
and to create a database using OLEDB Command calls to a SQL server.

/****** Object:  Database scmem    Script Date: 18/06/2002 9:00:09 PM
******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name =
N'scmem')
        DROP DATABASE [scmem]
GO

CREATE DATABASE [scmem]  ON (NAME = N'scmem_dat', FILENAME =
N'C:\Program Files\Microsoft SQL Server\MSSQL\Data\scmem.mdf' , SIZE =
2, FILEGROWTH = 10%) LOG ON (NAME = N'scmem_log', FILENAME =
N'C:\Program Files\Microsoft SQL Server\MSSQL\Data\scmem.ldf' , SIZE =
2, FILEGROWTH = 10%)
 COLLATE Latin1_General_CI_AS
GO

You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.