SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

SQLite

Last post 03-11-2011 12:23 PM by Mulander. 40 replies.
Page 1 of 3 (41 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 03-14-2007 10:36 AM

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    SQLite

    Hi!
    We are currently using Visual Studio, but are seriously considering changing to #Develop. It really looks great!
    However, in Visual Studio we have support for the SQLite database (http://www.sqlite.org) through the System.Data.SQLite component (http://sqlite.phxsoftware.com).
    Does anyone have any experience with using SQLite in #Develop?

    Regards
    Carl Gustafsson
  • 03-14-2007 12:54 PM In reply to

    Re: SQLite

    I have used SQLite in a few projects I've worked on, and it's very handy indeed. I've also found that The SQLite Administrator profram (found here: http://sqliteadmin.orbmu2k.de/ ) is an excellent GUI for managing the database files directly.

    Also, I don't think your ability to use it will differ between VS and SD, as it's not something that ties into the IDE so much. 

  • 03-15-2007 10:54 AM In reply to

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    Re: SQLite

    Hi!

    Thanks for the info. SQLite Administrator looks great, however it failed to open our database, which I think is because the DB has Swedish characters (ÅÄÖ) in its name... I have put a note on this on the SQLite Admin Forum.

    About IDE integration: What I meant was that in VS, you can see and edit SQLite DBs in the Server Explorer.
    I tried the Server Explorer in #Develop, but it just threw an exception. Is perhaps this an unfinished feature? :) It is not THAT important, would just be nice to have. :)

    Regards
    Carl Gustafsson
  • 03-15-2007 5:38 PM In reply to

    • dikon
    • Top 50 Contributor
    • Joined on 04-19-2006
    • London
    • Posts 74

    Re: SQLite

    Hi Carl

    I am working on the ServerExplorer - it is indeed an unfinished feature, although it is more complete in version 3.0, it does not yet have support for SQLite. I'd be happy to add this support if you are looking for it, and it should not take too long, it is just a fairly light plugin that utilises the ado.net 2 support - presumably this is vailabl ein the System.Data.SQLite namespace you mentioned.

    Once this is in place it is possible to:

    - set up logical database connections in the ServerExplorer

    - retrieve and browse metadata

    - 'describe' tables

    - edit and execute arbitrary SQL statements against any of the datasources

    - drag and drop tested connection strings into any drop target that accepts a string

    Would this be of interest to you?

    regards

    Dickon

  • 03-16-2007 12:26 AM In reply to

    • dikon
    • Top 50 Contributor
    • Joined on 04-19-2006
    • London
    • Posts 74

    Re: SQLite

    Incidentally - could you report the exception that was thrown when you tried to use SQLite please? It is possible that this is a known issue with an older version of ServerExplorer, which crashed when it found an ado.net 2 provider (as registered in machine.config or other .config file) for which it could not load the corresponding DbProviderFactory - this is fixed and it now notifies the user if this issue occurs, but doesn't crash.

    I will put SQLite support on somewhere near the top of the todo list.

    thanks

    Dickon

  • 03-19-2007 8:43 AM In reply to

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    Re: SQLite

    Hi!

    Thank you very much! I would say this is extremely interesting!

    Here is the exception I get when I:
    1. Add a connection in the Server Explorer (I call i Test)
    2. Try to set the connection string for the connection.

    SharpDevelop Version : 2.1.0.2429
    .NET Version : 2.0.50727.42
    OS Version : Microsoft Windows NT 5.1.2600 Service Pack 2
    Current culture : Swedish (Sweden) (sv-SE)
    Working Set Memory : 68316kb
    GC Heap Memory : 11580kb

    Exception thrown:
    System.ArgumentException: En post med samma nyckel har redan lagts till.
    vid System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
    vid System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
    vid SharpDbTools.Data.DbProvidersService.Initialize()
    vid SharpDbTools.Data.DbProvidersService.GetDbProvidersService()
    vid SharpDbTools.Forms.ConnectionStringDefinitionDialog.OnLoad(EventArgs e)
    vid System.Windows.Forms.Form.OnCreateControl()
    vid System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
    vid System.Windows.Forms.Control.CreateControl()
    vid System.Windows.Forms.Control.WmShowWindow(Message& m)
    vid System.Windows.Forms.Control.WndProc(Message& m)
    vid System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    vid System.Windows.Forms.ContainerControl.WndProc(Message& m)
    vid System.Windows.Forms.Form.WmShowWindow(Message& m)
    vid System.Windows.Forms.Form.WndProc(Message& m)
    vid System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    vid System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    vid System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    Best regards
    Carl Gustafsson
  • 03-19-2007 8:45 AM In reply to

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    Re: SQLite

    The first error string is in Swedish, I see... it says:
    "A post with the same key has already been added".

    / Carl
  • 03-19-2007 11:11 AM In reply to

    • dikon
    • Top 50 Contributor
    • Joined on 04-19-2006
    • London
    • Posts 74

    Re: SQLite

    Thanks Carl, I'll take a look at this. I downloaded the version of SQLite with the ado.net drivers included in the library - it does claim to support the entire ado.net 2.0 api, so it should be straightforward to add support for it. I'll post another message to this subject, and put something on my blog, when its done.

    Dickon

  • 03-19-2007 11:24 AM In reply to

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    Re: SQLite

    Grateful!

    And the author of the SQLite ADO.Net provider is very helpful and usually provides swift response if there are questions.

    Regards
    Carl
  • 03-21-2007 12:18 AM In reply to

    • dikon
    • Top 50 Contributor
    • Joined on 04-19-2006
    • London
    • Posts 74

    Re: SQLite

    Carl

     I think this exception may have been caused by duplicate config for the SQLite ado provider, perhaps in machine.config. I have added a handler to catch the exception so in the latest version of #D it will load the first DbProviderFactory that it finds config for and then issue a message to warn of duplicate data. If you are happy to do so I'd be interested to check your *.config files to see if I am right about this.

    Will start on the plugin for SQLite next...

    Dickon

  • 03-21-2007 8:47 AM In reply to

    • Carl
    • Top 150 Contributor
    • Joined on 12-14-2005
    • Sweden
    • Posts 21

    Re: SQLite

    Hmm.... i can not see anything strange in the machine.config. Here is the Data part:

    <system.data>
    <DbProviderFactories>
    <add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.38.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /></DbProviderFactories>
    </system.data>

    However, when I try to add a reference to the SQLite provider, there ARE two identical instances of it in the list... from the GAC, I presume. In VS only one shows up. Hmmm... perhaps something went wrong when registering SQLite.Net? 

    Really happy to hear about the plugin!

    Regards
    Carl

  • 03-31-2007 2:23 PM In reply to

    • dikon
    • Top 50 Contributor
    • Joined on 04-19-2006
    • London
    • Posts 74

    Re: SQLite

    Carl

    I have added SQLite support in build 2456 in the 3.0 build, that is at svn://sharpdevelop.net/sharpdevelop/trunk/SharpDevelop. I haven't been able to replicate your bug, but that may be because of some fixes that I put in a little while ago. If you do have a play with this bear in mind that there may be the odd bug in it - I haven't tested it thoroughly since I made some changes after the SQLite work exposed some other issues with the db addins.

    Let me know if you have any problems, or ideas for what you would like implemented next

    Dickon

     

  • 03-31-2007 5:53 PM In reply to

    Re: SQLite

    Not to get off-topic here, but will updated versions of the Server Explorer be back-ported to SD 2.1 also? The lack of the ability to save connection info between sessions makes the current Server / Database Explorer in 2.1 useless to me (It's too much trouble to re-create all of the connections each time I open SD), but SD 3.0 is pre-alpha, and from a usability standpoint, not too much works yet - even if the Server Explorer is fully finished in that branch, I can't actually code, debug, or compile in it yet. So it's a bit inconvenient for the Server Explorer to only be updated in a version of SD that doesn't work yet :-)

    So, are you planning to have the Server Explorer only available with 3.0 when it's ready, or will updates be made in the 2.1 branch as well?

    Thanks! 

  • 04-01-2007 6:22 PM In reply to

    Re: SQLite

    >Not to get off-topic here, but will updated versions of the Server Explorer be back-ported to SD 2.1 also?

    We today decided to remove the data tools from 2.x as there won't be a backport for 2.2.

    Chris 

  • 04-01-2007 7:33 PM In reply to

    Re: SQLite

    <wipes tear from my eye>

    Looking at the Wiki, there's no estimated release timeline for SD3, even for a beta. I don't mean to question the decision not to incorporate this feature in the 2.x branch, but I would like to know what the reason is? It seemed to be a nearly-functional and extremely useful component, and to remove it from the current releases (including the 2.2 release which is slated for June '07) and only support it in a version with no near-term estimated functional release surprises me. I'm sure there's a good reason - what is it? :-)

Page 1 of 3 (41 items) 1 2 3 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.