Coding a dynamic database

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KMGriffiths
Posts: 7
Joined: Thu Aug 06, 2009 7:32 am

Coding a dynamic database

Post by KMGriffiths »

I can find various commands/functions for creating tables in a database but can anyone give me the basic code to create a sql database named surveyor with 4 tables called doors, windows, height, width.

Any help would be appreciated.

Michael
Michael Griffiths
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus »

Hi Michael,

this is pretty straightforward SQL:
...
CREATE DATABASE surveyor
...

Check the query result and if OK then you can create your 4 tables with the necessary fields, maybe in a repeat loop :)


Best

Klaus
mfstuart
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 16
Joined: Sun Apr 09, 2006 9:49 pm

re: Coding a dynamic database

Post by mfstuart »

Hi Michael,
If you need a tool to manage a SQLITE database, and if you have FireFox, check FireFox's Add in manager and search for SQLite Manager, it's free.
This is what I've been using recently.

After using the manager interface, it displays the CREATE DATABASE, CREATE TABLE, and CREATE INDEX sql scripts. You can then copy each of the scripts into RunRev to then manage your applications database and tables.
I put these scripts into constants and reference them in my scripts. Works great.

HTHU,
Mark Stuart
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3582
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Post by mwieder »

Ditto here. SQLite Manager is one of my favorite Firefox plugins.
Post Reply