> Surely, the fact that SQLite doesn't permit one file having several
> databases should just mean that "CREATE DATABASE xxxx;" is a really
> simple operation, not that it throws an exception and/or fails.

There's no such command in SQLite. So if Linq can't live without
issuing this command then it can't be used with SQLite.


Pavel


On Tue, May 24, 2011 at 11:05 AM, Ruth Ivimey-Cook <r...@ivimey.org> wrote:
> Pavel Ivanov wrote:
>>> If I try to query database existence using Linq's "DatabaseExists" I get
>>> a NotImplemented exception in the sqlite ChangeDatabase function - which
>>> doesn't make sense to me.
>> SQLite doesn't have a notion of server containing several databases.
>> That's why it makes perfect sense that SQLite doesn't implement
>> DatabaseExists or ChangeDatabase methods. If you want to check
>> database existence just check if file exists in the file system. If
>> you want to use new database just open new connection to it. Also if
>> you want to create a new database just open connection to it, it will
>> be created automatically.
> I wanted to distinguish between a file being present and that file
> actually being parsable as an sqlite database.
>
> I also wanted Linq to create the tables required in the file... i.e.
> moving from "no file" to s3db with tables".
>
> In Linq  the CreateDatabase call both creates the database (i.e. in
> sqlite terms, make an s3db file) and populates that database with
> tables, according to the metadata and class information provided in the
> code.
>
> Surely, the fact that SQLite doesn't permit one file having several
> databases should just mean that "CREATE DATABASE xxxx;" is a really
> simple operation, not that it throws an exception and/or fails.
>
> If the s3db file format includes a database name (distinct from the name
> of the file) then that name can be used for xxxx - otherwise, the xxxx
> should be ignored IMO.
>
> Regards
> Ruth
>
> --
> Software Manager&  Engineer
> Tel: 01223 414180
> Blog: http://www.ivimey.org/blog
> LinkedIn: http://uk.linkedin.com/in/ruthivimeycook/
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to