PDA

View Full Version : Support for SQLite3


nokiola
03-21-2007, 09:26 AM
Hello,

I see that the dbProvider does not support SQLite3 database type... I've tried adding support following the model of the other databases supported but I cannot find something similar to SQLiteCommandBuilder.DeriveParameters inside System.Data.SQLite assembly.

Also... I don't know what error codes to map for converting exceptions. I will post all the configuration attached in case that somebody wants to take a look or add an implementation in Spring.Data assembly resources. :-)

I would be grateful if SQLite support will be added since is such a fine database. NHibernate supports it.

Regards,
Robert

PS. SQLite error codes are explained at the following URL: http://www.sqlite.org/capi3.html

nokiola
03-24-2007, 05:40 PM
Can someone try to explain me why do I need to specify CommandBuilderDeriveParameters method? Since SQLite3 does not have such a method, shouldn't the Spring.NET API need to be more permissive and allow the configuration of providers missing this "feature"?

Are there any workarounds?

I really need to make SQLite3 provider work with Spring.NET. Since NHibernate uses it, I would like to be able to use it from Spring.Net too.

Robert

Mark Pollack
03-31-2007, 04:00 AM
Hi Robert,

Sorry for the long delay in replying. Which provider are you using? The one located here, http://adodotnetsqlite.sourceforge.net/downloads/ , does contain CommandBuilder with a DeriveParameters method. I am familiar with this one as it is in the default ibatis.net provider configuration file.

As a workaround, you can you try to list any old type and method as a stand-in type. As long as you don't use DeriveParameter functionality you should be ok. Since you are using NHibernate and not AdoTemplate or classes in the Spring.Data.Objects, that seems assured.

Nevertheless, I do agree that a more explicity 'opt-out' config option should be created. I've created a JIRA (http://opensource.atlassian.com/projects/spring/browse/SPRNET-514)issue to address this in the future.

This all stems from the fact that System.Data.Common.DbCommandBuilder does not have the DeriveParameters method listed, it just turns out to be a common implementation choice.

Cheers,
Mark

Mark Pollack
11-21-2007, 05:40 PM
Hi,

This has been fixed now. See http://forum.springframework.net/showthread.php?t=3857 for additional discussion.

Cheers,
Mark