SQLite DB Schemas

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf SQLite DB Schemas

  • Creator
    Topic
  • #52032
    Kenadi Moore
    Participant

      I am just starting to experiment with SQLite, but missed what is probably a very basic piece of information.

      Where does the database schema “live”?  Is it part of a TCL?  A stand alone file?  (And if so, where does that file go and how is it referenced?)

      Thanks!

      Kenadi Moore

      OhioHealth

    Viewing 2 reply threads
    • Author
      Replies
      • #72800
        David Harrison
        Participant

          The database is a single file and resides where you want it. Here’s some tcl code I use:

          Code:

           package require sqlite
           sqlite db /export/quovadx/qdx5.6/integrator/development/tclprocs/agfatest.db
           db eval “INSERT INTO ro VALUES (’$id’,’$ord’,’$svc’,’$dtTm’)”
           db close


          You will need to setup the database tables first. I use Sqlite Expert Personal http://www.sqliteexpert.com to design the database and then ftp the file to my Cloverleaf server in the tclprocs directory.

        • #72801
          Kenadi Moore
          Participant

            Does it have to be created externally?

            What does this command do from Max’s presentation:

            sqlite example.db < example.sql (where example.sql is the schema for the table)

            Could I incorporate this into a tcl?

            Thanks,

            Kenadi

          • #72802
            Kenadi Moore
            Participant

              I think I answered my own question…

              I executed the command mentioned above from the command line, and it did indeed created the new database and allow me to then populate the database table from a tcl proc.

              Note: we are running 5.7 and that seems to require typeing sqlite3, not sqlite.

              Thanks,

              Kenadi

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.