Re: Run script from ADO components - if possible
- From: "Alan T" <alanpltseNOSPAM@xxxxxxxxxxxx>
- Date: Wed, 11 Apr 2007 16:41:07 +1000
Hi,
This will be a problem.
I want to create a database at runtime, so I need to run the script:
-create database
-use that database
-create table 1
-create table 2
- .....
-create table N
-insert lookup table data
In addition, if I separate each create table statement, I need to put all
those lines in one line ?
"Mikael Eriksson" <micke314@xxxxxxxxx> wrote in message
news:461c7caf$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Alan T skrev:
I want to run scripts like:
CREATE DATABASE [Employee]
COLLATE Latin1_General_CI_AS
GO
exec sp_dboption N'Employee', N'autoclose', N'false'
GO
exec sp_dboption N'Employee', N'bulkcopy', N'false'
GO
CREATE TABLE [dbo].[Table_Employee] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (255) NULL ,
[Address] [varchar] (255) NULL
) ON [PRIMARY]
GO
I tried to put these strings into TADOQuery but it doesn't work.
Hi!
Here you have four statements separated by *GO*.
You have to execute one statement at a time.
regards
/Micke
.
- Follow-Ups:
- Re: Run script from ADO components - if possible
- From: yannis
- Re: Run script from ADO components - if possible
- From: Mikael Eriksson
- Re: Run script from ADO components - if possible
- References:
- Run script from ADO components - if possible
- From: Alan T
- Re: Run script from ADO components - if possible
- From: Mikael Eriksson
- Run script from ADO components - if possible
- Prev by Date: Re: Run script from ADO components - if possible
- Next by Date: Re: Run script from ADO components - if possible
- Previous by thread: Re: Run script from ADO components - if possible
- Next by thread: Re: Run script from ADO components - if possible
- Index(es):
Relevant Pages
|
|