Create Database

A

Adrian

When I enter the code below into the cmnd.CommandText string
I get nothing but errors, presumably something else should be
done: What?

Adrian

USE master
GO
CREATE DATABASE Employees
ON
( NAME = Empl_dat,
FILENAME = 'f:',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'Sales_log',
FILENAME = 'g:',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
GO
 
J

JosephByrns

Have you tried just using the Create string as the query string (i.e.
without the "USE master" and "GO" statements). Then when you create your
adaper open up the master database as part of your connection string?
 
J

Jim Hughes

GO is not a TSQL command. It only works in Query Analyzer.

Split the commands at the GO keyword and execute each separately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top