Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Table creation SQL script?

7 views
Skip to first unread message

tsao

unread,
Feb 7, 2002, 12:33:00 AM2/7/02
to
Does there exist the sql script that creates tables defined in Schema.msi?

Rich - Microsoft Windows Installer MVP

unread,
Feb 7, 2002, 12:56:36 AM2/7/02
to
[Please do not mail me a copy of your followup]

"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

tsao

unread,
Feb 7, 2002, 1:27:34 AM2/7/02
to
I'm sorry my question was not clear, what I needed is
the sql script to feed WiRunSql.vbs.
Anyway, my problem was solved, I found that I can create table
using Database.Import method to import idt files I exported
from Schema.msi using Orca.
Thanks for the reply.

"Rich - Microsoft Windows Installer MVP" <legaliz...@mail.xmission.com> wrote in
message news:a3t4uk$a6i$1...@news.xmission.com...

Rich - Microsoft Windows Installer MVP

unread,
Feb 7, 2002, 5:49:55 PM2/7/02
to
[Please do not mail me a copy of your followup]

"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`)

Mark Richards

unread,
Feb 7, 2002, 6:41:45 PM2/7/02
to
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. 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...


"Rich - Microsoft Windows Installer MVP"
<legaliz...@mail.xmission.com> wrote in message

news:a3v0aj$ru7$1...@news.xmission.com...

Rich - Microsoft Windows Installer MVP

unread,
Feb 7, 2002, 6:56:20 PM2/7/02
to
[Please do not mail me a copy of your followup]

"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.

0 new messages