unknown wrote:
> I am just learning Ruby language. I downloaded SQLite3 database using
> gem - "gem list" shows that SQLite3 is installed.
> My question - how to create a database? I tried to do it from a DOS
> prompt - it didn't work.
> 
> Thanks,
> 
> Zalek

require 'sqlite3'
db = SQLite3::Database.new( "test.db" )
sql = <<SQL
    create table the_table (
      a varchar2(30),
      b varchar2(30)
    );

SQL

db.execute_batch( sql )

-------
Of course, you should have sqlite3 installed. there should be some 
command called "sqlite3" in your path, if it is.

to open a db, do:

sqlite3 new.db


You should get a prompt. Type "help".

See: http://sqlite-ruby.rubyforge.org/sqlite3/faq.html
-- 
Posted via http://www.ruby-forum.com/.