Subject | AW: [IBO] how to create database from script |
---|---|
Author | Queck Rainer |
Post date | 2003-10-01T06:30:49Z |
Hello Jason,
thanks for responding.
I have solved the problem in the meanwhile. It was my fault. I had a entry to an "old" IBObjects folder in my search path.
Removing this solved the problem.
Thanks
Rainer
-----Ursprüngliche Nachricht-----
Von: Jason Wharton [mailto:jwharton@...]
Gesendet: Dienstag, 30. September 2003 20:14
An: IBObjects@yahoogroups.com
Betreff: Re: [IBO] how to create database from script
I think there might be a problem in TIB_Script with how I handle the SET
NAMES line of script code. I need to look into this. Try it without and let
me know how it goes.
The suggestion to use CreateDatabase would probably be a good idea. Just be
sure to have the associated TIB_Connection connected prior to running the
rest of the script.
Ideally, I want you to be able to just run the script and have the database
created on the fly.
Jason
thanks for responding.
I have solved the problem in the meanwhile. It was my fault. I had a entry to an "old" IBObjects folder in my search path.
Removing this solved the problem.
Thanks
Rainer
-----Ursprüngliche Nachricht-----
Von: Jason Wharton [mailto:jwharton@...]
Gesendet: Dienstag, 30. September 2003 20:14
An: IBObjects@yahoogroups.com
Betreff: Re: [IBO] how to create database from script
I think there might be a problem in TIB_Script with how I handle the SET
NAMES line of script code. I need to look into this. Try it without and let
me know how it goes.
The suggestion to use CreateDatabase would probably be a good idea. Just be
sure to have the associated TIB_Connection connected prior to running the
rest of the script.
Ideally, I want you to be able to just run the script and have the database
created on the fly.
Jason
----- Original Message -----
From: "Queck Rainer" <Rainer.Queck@...>
To: "IBObjects (E-Mail)" <IBObjects@yahoogroups.com>
Sent: Monday, September 29, 2003 6:28 AM
Subject: [IBO] how to create database from script
> Hi List,
>
> I have a scrip that workes fine from within IB_Expert.
> There I can execute this script and create my database.
>
> How can I achieve the same result with "TIB_Script" using the same script
file?
>
> I tried :
>
> GenDbScr.SQL.LoadFromFile(FSqlScript);
> GenDbScr.Sql.SaveToFile('C:\temp\spc.sql');
> GenDbScr.Execute;
>
> but here I get "Statement must have an IB_Connection assigned.
> Well I assigned my IB_Connection but then I get the
> "invalid database handle (no active connection)" message.
>
> Well then I set the DbConnection.Connected:=True and recieved the "can't
finde file"message which is true, since I in this moment have no
database....
>
> What is the right way to create a database with a given script?
>
> Thanks for hints
> Rainer
>
> //snip form script....
> //=============
>
>
/***************************************************************************
***/
> /**** SPC Database
****/
>
/***************************************************************************
***/
>
> SET SQL DIALECT 3;
>
> SET NAMES ISO8859_1;
>
> CREATE DATABASE '<MyServer>:<Desired paht and db name>'
> USER '<MyUser>' PASSWORD '<my password>'
> PAGE_SIZE 8192
> DEFAULT CHARACTER SET ISO8859_1
> FILE '<Desired file1>' LENGTH 244000 PAGES
> FILE '<Desired file2>' LENGTH 244000 PAGES
> .................
> FILE '<Desired file n>' LENGTH 244000 PAGES ;
>
> /* ====================== DOMAINS
============================================*/
> CREATE DOMAIN D_STREAM AS BLOB SUB_TYPE 0 SEGMENT SIZE 80;
>
> ...... and so on.
> As mentioned the script works fine from within IB-Expert.
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=244522.3707890.4968055.1261774/D=egroupweb/S=1705007183:HM/A=1595056/R=0/SIG=124p07ne0/*http://ashnin.com/clk/muryutaitakenattogyo?YH=3707890&yhad=1595056> Click Here!
<http://us.adserver.yahoo.com/l?M=244522.3707890.4968055.1261774/D=egroupmail/S=:HM/A=1595056/rand=708308719>
___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]