Thanks for the help...
the 'light' IS dawning but it's dim and so very, very far away at the moment
I decided to take my DB back to just one table and monitor its creation using the (free trial) LcSQLiteAdmin app.
The idea works in that I can now 'see' the results of my furious tap, tap, tapping. Rather blunt / 'beat 'em to death' / 'trial and error' but then the various 'instructions' I have all appear to offer some error...
The instructions re: how to creat a SQLite DB from within LC are straightforward enough - and work !
As are the instructions re: adding a table !
But, I now need to go off-piste a wee bit and am trying to modify some of the properties of the first column/item in my table. Ideally I want to make it a Primary Key, Not Null and Auto_Increment (In reality, I guess an auto incrementing field cannot be null but... sticking to the script...)
Code: Select all
put "CREATE TABLE DBImages (ID char(8) NOT NULL AUTO_INCREMENT, Name char(50), DoB char(10), DateJoined char(10) [,etc ,etc ,etc]... PRIMARY KEY (ID) )" into sDBTableData
doe NOT create my table
But
Code: Select all
put "CREATE TABLE DBImages (ID int, Name char(50), DoB char(10), DateJoined char(10) [,etc ,etc ,etc]... PRIMARY KEY (ID) )" into sDBTableData
does

and the Admin indicates I have a Primary Key property configuration on the first field ('ID') - even better...
So now I just need to add the Auto_Increment function / property to the said 'ID' and I'm 'cooking' again...
So,
Code: Select all
put "CREATE TABLE DBImages (ID int NOT NULL AUTO_INCREMENT, Name char(50), DoB char(10), DateJoined char(10) [,etc ,etc ,etc]... PRIMARY KEY (ID) )" into sDBTableData
results in a backward step and no table in my DB... hmmm...
Changing the line to :
Code: Select all
put "CREATE TABLE DBImages (ID int AUTO_INCREMENT, Name char(50), DoB char(10), DateJoined char(10) [,etc ,etc ,etc]... PRIMARY KEY (ID) )" into sDBTableData
gets me someways in the right direction (in that the table is created) BUT looking like (monitored within SQLiteAdmin) :
ID int (Auto_Increment,Namechar50)
DoB char(10
...
as my first table column/field name... arghhh !!
various connotations/plays on the wording of the auto_increment property above just provides one of the above two responses - both infuriating...
Anyone any further ideas please ? Surely it just CAN'T be THIS hard !.... Can it ?...
As an aside, but I'm guessing this will probably affect everyone messing about with SQL and LC, I use the
to close the DB at the end of each of my wee tests and I exit SQLiteAdmin BUT I still can't delete the DB in Explorer / Finder until I close the complete LiveCode SDK/IDE or (at least) remove my pp in development from the IDE/SDK (REALLY frustrating and even more time consuming!) Is there a way to disconnect/release/disassociate the DB file from the 'app' in the LiveCode SDK so that I can simply delete it before starting the next test (This is concerning me not just for now, but for the futurre and my ongoing DB 'work of art' (!) with LiveCode.
I know this is a long one, so please do give yourself a pat on the back and a KitKat if you got this far without falling asleep
I'm sure the point I make is really simple to those 'in the know' but otherwise (me !) it'll drive you insane...
Thanks a million in advance.
I'm 'getting there'... just far too slowly !
Mac (Siera) and PC (Win7)
LiveCode 8.1.2 / 7.1.1