Custom Database Classes

Topics: Mobile Client Software Factory
Jul 2, 2006 at 3:07 AM
originally posted by: thaoula1

Hi Guys,

Is it possible to create a Database provider for the excellent SQLite provider which is created and maintained by Robert Simpson - http://sqlite.phxsoftware.com/.

I looked at creating my own database but it seems that the assembly references SQLServerCE and the ISqlDatabase referes to the SQLCeResultSet which is a strange object that only SqlServerMobile provides. The references to to the SQLServerCe dll's means that i need to alter your application block which means that I will need to fork your version in my own application. Otherwise, i would need to install SQLServerMobile on the device.

I would like to create an SQLite provider especially since it is both smaller and faster than SQLServerMobile. Also the same database file can be used on both the device and the desktop.

How would you recommend i proceed?

Kind Regards,
Tarek
Jul 2, 2006 at 4:27 AM
originally posted by: m_a_madero

I think you would have to do your own SqCeResultSet that works with SqlLiteProvider or just dont use those methods when using thar provider.

You can also use SqlServerMobile on both, desktop and device.

I made one work for Informix on de Desktop version of DAAB, for the desktop was easier because we used the generic DB and just create de Factory for Informix and change two lines in .config.

Good luch with SqlLite
Jul 2, 2006 at 12:36 PM
originally posted by: thaoula1

Hi mamadero,

Thank you very much for your response.

The major issue is that the Data Application block makes reference to the SQLMobile dll and so does the SQLDatabase base class. This means that SQLServerMobile will need to be installed for any custom provider to work.

I know that you these issues are minor and they can be fixed but this would require personal forking of the application block. This would make future merging more difficult easpecially at a time when the blocks are being improved.

Kind Regards,
Tarek
Jul 2, 2006 at 2:09 PM
originally posted by: m_a_madero

I am not sure about the following, but its something you might want to try.

Even tough the dll has a dependency to another dll, it won't break your application (in case you didnt deploy it) unless you instantiate some class that in turn instantiates another class of the SqlServerCce.dll assembly.
I usually dont do the setup programs, but I guess you could simply delete the automatically detected reference to SqlServerCe.
If you are deploying using VS, it shouldn't install SqlServerCe....

Hope this work...

let me know.