Met sqldb van Lazarus kan je in ieder geval in pascal databases aanmaken. In feite voer je gewoon een sql commando uit. Ik post het hier in de hoop dat met jouw db driver ook zowat kan:
Delphi Code:
// if file not exists:
SQLite3Connection1.Open;
SQLTransaction1.Active := true;
SQLite3Connection1.ExecuteDirect('CREATE TABLE "AUTHORS"('+
' "id" Integer NOT NULL PRIMARY KEY AUTOINCREMENT,'+
' "AuthorName" Char(128) NOT NULL,'+
' "LastVisited" DateTime NOT NULL,'+
' "Notes" Text);');
// Creating an index based upon id in the DATA Table
SQLite3Connection1.ExecuteDirect('CREATE UNIQUE INDEX "Data_id_idx" ON "AUTHORS"( "id" );');
SQLTransaction1.Commit;
SQLite3Connection1.Close;
Bookmarks