L Laurie Member Licensed User Longtime User Mar 3, 2014 #1 the database examples (persons.db) seem to be being created by copying an existing file??? How do I create a new db file?
the database examples (persons.db) seem to be being created by copying an existing file??? How do I create a new db file?
HotShoe Well-Known Member Licensed User Longtime User Mar 3, 2014 #2 something likr this: Code: Copy Sub create_new_db db.Initialize(dbdir,"auth.db",True) db.ExecNonQuery("CREATE TABLE servers (id INTEGER PRIMARY KEY, servername TEXT UNIQUE, domain TEXT, username TEXT, passwd TEXT, anon INTEGER)") End Sub the True in the db.Initialize statement tells the method to create the file if it doesn't exist. from there you create the tables and define the fields inside the table(s) using SQL statements. --- Jem Upvote 0
something likr this: Code: Copy Sub create_new_db db.Initialize(dbdir,"auth.db",True) db.ExecNonQuery("CREATE TABLE servers (id INTEGER PRIMARY KEY, servername TEXT UNIQUE, domain TEXT, username TEXT, passwd TEXT, anon INTEGER)") End Sub the True in the db.Initialize statement tells the method to create the file if it doesn't exist. from there you create the tables and define the fields inside the table(s) using SQL statements. --- Jem
mangojack Expert Licensed User Longtime User Mar 3, 2014 #3 You can also use these to create , view and edit db's on PC if needed basic and simple .. SQlite database browser ... more features .. SQlite Expert ... Upvote 0
You can also use these to create , view and edit db's on PC if needed basic and simple .. SQlite database browser ... more features .. SQlite Expert ...
DonManfred Expert Licensed User Longtime User Mar 3, 2014 #4 If you prefer an Addon for firefox then you can give this a try. Upvote 0
klaus Expert Licensed User Longtime User Mar 3, 2014 #5 You find an example in the SQLiteLight1 example. Look at the link in my signature. Upvote 0
L Laurie Member Licensed User Longtime User Mar 4, 2014 #6 Thank you both for your prompt responses. Klaus, you're absolutely right, all I needed is in your example SQLiteLight1 Upvote 0
Thank you both for your prompt responses. Klaus, you're absolutely right, all I needed is in your example SQLiteLight1