Quick Question

I have a mysterious bug, and I wonder if it can have anything at all to do with this line of code:

NamesDB.SQLExecute “create table Info (Name varchar, ID integer NOT NULL PRIMARY KEY)”

because if I take out " ID integer NOT NULL PRIMARY KEY" the bug seems to disappear!

  ???

What’s the error reported in NamesDb.errormessage?

Greg,

Can I email you my VERY short program as an attachment? I’m doing something wrong and am at a loss.

Alright, the error reported was “Operation cannot be completed because the database is closed.”
So… How do I open it?

Have a look to the language reference

REALSQLdatabase.CreateDataBaseFile
or
Database.Connect

It has an easy explained exsample

http://documentation.xojo.com/index.php/SQLiteDatabase.CreateDataBaseFile