[Gambas-user] Connection.Tables

tobias tobiasboe1 at ...20...
Sun Dec 5 17:45:44 CET 2010


hi,
i noticed something in my test with Connection.Edit() (sqlite3):
i created a table with connection.exec()

hConnection.Exec("create table test(id integer primary key, name
varchar(10));")

then inserted some data
hConnection.Exec("insert into test(name) values(\"Aaron\");")
hConnection.Exec("insert into test(name) values('Zacharias');")

now, because i thought, this is the only way to prevent the error "table
test has no primary key", i set the primary key property of the table
object:
hConnection.Tables["test"].PrimaryKey = ["id"]

not this brought me "Read-only property".
is this because i created the table via exec() and there is no
synchronization (possible)?

regards,
tobi





More information about the User mailing list