Hello, what is wrong with this script ? I get a lot of errormessages from SDAC and the DB SQL Monitor when executing the script with SDAC SQLScript
Script: (created with EMS SQL Manager)
CREATE DATABASE [rgea]
ON PRIMARY
( NAME = [rgeadat],
FILENAME = 'C:\Programme\Borland\Delphi7\Projects\rgea.21\daten\rgeadat.mdf',
SIZE = 1 MB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 10 % )
LOG ON
( NAME = [rgealog],
FILENAME = 'C:\Programme\Borland\Delphi7\Projects\rgea.21\daten\rgealog.ldf',
SIZE = 1 MB,
MAXSIZE = UNLIMITED,
FILEGROWTH = 10 % )
GO
Delphi Code to use the script
begin
If Script.FileName>'' Then
Begin
SQLServer.Server:= Servername.Text;
SQLServer.Username:= Benutzer.Text;
SQLServer.Password:= Passwort.Text;
SQLServer.Database:= 'master';
SQLServer.Connected:= True;
SQLScript.SQL.Clear;
SQLScript.SQL.LoadFromFile(Script.FileName);
SQLScript.Execute;
End;
end;
Best regards
Stefan
Create Database
-
Guest
Hi Ikiar,
thanks for your help,
i removed the go statment and exit Delphi and then i run the program and it worked correctly.
i use MSDE for programming and i have to install the Queryanalyzer from the SQL Server CD. It is a good Program to test the scripts
I thin k that the MSDE had headache that day
Thanks
Stefan
thanks for your help,
i removed the go statment and exit Delphi and then i run the program and it worked correctly.
i use MSDE for programming and i have to install the Queryanalyzer from the SQL Server CD. It is a good Program to test the scripts
I thin k that the MSDE had headache that day
Thanks
Stefan