"tsao" <g04...@mail.ecc.u-tokyo.ac.jp> spake the secret code
<u45qLe5rBHA.2252@tkmsftngp03> thusly:
>Does there exist the sql script that creates tables defined in Schema.msi?
You can create a table with WiRunSql.vbs that ships with the SDK.
There is an example in the SDK docs under "SQL Syntax" that shows how
to add a table. Here is an example from izfree:
dim view : set view = db.openview("CREATE TABLE `izProperty`(" &_
"`Name` CHAR(72) NOT NULL, `Value` CHAR NOT NULL " &_
"PRIMARY KEY `Name`)")
view.execute
view.close
This creates a table called izProperty with two columns, Name and
Value.
--
Ask me about my upcoming book on Direct3D from Addison-Wesley!
Direct3D Book http://www.xmission.com/~legalize/book/
Don't Support Spammers! Boycott Fractal Painter 7!
http://www.xmission.com/~legalize/spammers.html
"Rich - Microsoft Windows Installer MVP" <legaliz...@mail.xmission.com> wrote in
message news:a3t4uk$a6i$1...@news.xmission.com...
"tsao" <g04...@mail.ecc.u-tokyo.ac.jp> spake the secret code
<O9Fsq85rBHA.2056@tkmsftngp03> thusly:
>I'm sorry my question was not clear, what I needed is
>the sql script to feed WiRunSql.vbs.
What I posted -is- the SQL script:
> CREATE TABLE `izProperty`(`Name` CHAR(72) NOT NULL,
> `Value` CHAR NOT NULL PRIMARY KEY `Name`)
"Rich - Microsoft Windows Installer MVP"
<legaliz...@mail.xmission.com> wrote in message
news:a3v0aj$ru7$1...@news.xmission.com...
"Mark Richards" <mpric...@delthis.msn.com> spake the secret code
<OgSeeEDsBHA.2760@tkmsftngp05> thusly:
>tsao wanted to know how to make sure the table conformed to the schema,
>ie: is there a script that would, from the table description in schema,
>build the correct sql string to create the table, and then create the
>table.
OK, then I totally missed that in the question, probably the language
barrier got in the way.
>Your answer was only the last part :-]. I haven't seen such a
>script, but then I haven't looked hard, since as tsao found out, opening
>Orca and exporting the table creates a correct (empty) idt file that can
>trivially be imported by a database automation object to create the
>correct table...
I'm not aware of such a script, no. You could write a script that
constructed the SQL statement based on a database with an existing
table. izfree grabs the column definition stuff from the database and
displays it and from that you could construct the necessary SQL
statement.