in reply to Re: create SQLite database problems
in thread create SQLite database problems

there is a connect routine in the code sample I provided.

Replies are listed 'Best First'.
Re^3: create SQLite database problems
by chilledham (Friar) on Mar 06, 2012 at 19:55 UTC

    I am unclear on what you mean by "when I go to the SQLite3 procedure". Can you expand on that, please?

    In my example, after the perl script runs, I used the sqlite3 command line tool to connect to the database that was created. That's where I saw the tables and schema.

      sorry, I was not clear...I meant the sqlite3 command line tool.

        What directory are you in when connecting to the sqlite3 database? What command are you using to connect to said database?

        I changed the path to the database file like so: my $database = "/Users/collin/Db/code_review.db";

        Then:

        kryten:scripts collin$ pwd /Users/collin/scripts
        And to connect to the database via sqlite3:
        kryten:scripts collin$ sqlite3 /Users/collin/Db/code_review.db SQLite version 3.7.7 2011-06-25 16:35:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables depot review reviewer sqlite> .schema CREATE TABLE depot (change_num INTEGER PRIMARY KEY, depot VARCHAR(50) ); CREATE TABLE review (key INTEGER PRIMARY KEY, submitter VARCHAR(50), director VARCHAR(50), change_num INTEGER, action VARCHAR(20), time DATE ); CREATE TABLE reviewer (change_num INTEGER PRIMARY KEY, reviewed_by VARCHAR(50) ); CREATE TRIGGER INS_TIMEENTER AFTER INSERT ON REVIEW BEGIN UPDATE REVIEW SET TIME = DATETIME('NOW','LOCALTIME') WHERE ROWID = NEW.ROWID; END;