Hi everyone,

I'm having some trouble using Vala and libda 5.0 for SQLite.

In Python I have succesfully created a SQLite database with
conn = Gda.Connection(provider = Gda.Config.get_provider("SQLite"),
cnc_string = "DB_DIR=.;DB_NAME=test")
conn.open()
conn.close()

In Vala I tried different solutions:

conn = new Gda.Connection (); // fails with undefined reference to `gda_connection_new'

or with:
conn = new Gda.Connection.open_from_string ("SQLite",
           "DB_DIR=.;DB_NAME=test", null,
           Gda.ConnectionOptions.NONE);

// fails because the database file doesn't exist.

So how can I create the SQLite file at connection startup ?

Chris
_______________________________________________
gnome-db-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to