in

System.Data.SQLite

An open-source, enhanced version of the SQLite database engine for Windows

Visual Studio 2008 express edition

Last post 04-21-2008 7:21 AM by JazzBass. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 01-17-2008 6:49 AM

    Visual Studio 2008 express edition

     Hi,

    I have written a small app using VB.NET 2008 express edition and Microsoft Access, but i would like to start using System.Data.SQLite rather than access. From what i have read in other posts on this forum, design time support does not work in the express editions of Visual Studio.

     Can someone give me a quick example that shows how to connect to an SQLite db, run queries against the db, retrieve results, etc all in vb.net code without using the SQLite designer ??

     In case you cant tell, i'm only a beginner, so please be patient with me :)

     This is how i currently do it in vb with ms access and adodb.net

    =================================================================== 

     Dim RS As New ADODB.Recordset
     Dim Con As New ADODB.Connection
     Dim ConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Loans\Loans.mdb;"

    Con.ConnectionString = ConnectionString

    Con.Open()

    RS = Con.Execute("SELECT * FROM Loans")

    ===================================

     Can something similiar be done with System.Data.SQLIte ?

    thanks,

    Michael

     

  • 01-17-2008 4:03 PM In reply to

    Re: Visual Studio 2008 express edition

    http://sqlite.phxsoftware.com/forums/t/1033.aspx

    I posted all the basics here for you guys (DO NOT open a new connection for every query).

    The 2nd example called read variables should answer your question.

  • 03-29-2008 3:33 PM In reply to

    Re: Visual Studio 2008 express edition

    Hi,

     I followed the link but it's not saved me from failed run..

    When i try the code you gave :

               Dim SQLconnect As New SQLite.SQLiteConnection()
            Dim SQLcommand As SQLiteCommand
            SQLconnect.ConnectionString = "Data Source=" & f.FileName & ";"
            SQLconnect.Open()
            SQLcommand = SQLconnect.CreateCommand
            SQLcommand.CommandText = "SELECT * FROM Item"

     

    I'm returned an error..:  the type SQLite.SQLiteConnection is not recognized.

    yet, i instelled the SQLite-1.0.48.0-setup.exe file.

    So i don"t understang how i can make it works?

    I run with VB studio express 2008. Is anyone have a "tip/how to" on installation  of System.Data.SQLite ??

    But when i look for object , i can't see the System.Data.SQLite one...

    Thanks a lot for help.

    Ewans. 


  • 03-29-2008 4:43 PM In reply to

    Re: Visual Studio 2008 express edition

    hi again,

     after re-reading the .chm, i founf that section.

    Express Edition Limitations

    All Express Editions (except Visual Web Developer) are hard-coded to only allow you to design for Jet and Sql Server Database Files.  The only way for SQLite to install its designer is to temporarily replace one of the existing "approved" designers.  Therefore, when you install the SQLite designer for one of these express editions, it will temporarily replace the Microsoft Access designer.  You can revert back to the Access designer simply by re-running the install.exe program and un-checking the boxes.

     

    I tried installing with checked, and installing whitout checked option, and the system.data.sqlite object still doesnt appear....

    i still search to fix it. 

     

  • 03-29-2008 5:01 PM In reply to

    Re: Visual Studio 2008 express edition

    this time, i tried to add a datasource from the VS2008 express.

    After selecting SQLite Database File (.NET Framework Data Provider for SQLite) and giving the path to my DB, 

    i obtain that error message. 


    photo hebergée par zimage
  • 04-15-2008 1:19 PM In reply to

    Re: Visual Studio 2008 express edition

    Hi,

     Unfortuately, that looks like the same error message myself and others have received when using Visual Basic 2008 Express.

    Robert (maintainer of the provider) has posted that Microsoft defeated the way he was able to get the provider to work with Design Time support.  It works fine in Visual Basic Express 2005, but not in 2008.

    As far as I know, there is no work around at this point and probably never will be.  Just a limitation of the Express Editions (minus Visual Web Developer 2008 Express).

    I had to jump ship as 2008 had some features in the IDE and elsewhere that I wanted to use.  So because of Microsoft, I'm going to be using SQL Server Compact Edition for any client DB development from this point forward, unless somehow Robert is able to beat the system. :)

    Anyway, I hope that helps.

    JB 

  • 04-21-2008 6:59 AM In reply to

    Re: Visual Studio 2008 express edition

     Small thing though, if a user didn't install Design-Time support they can still use System.Data.SQLite, with Express 2008 right? I only have professional.

     I ask because I just wrote a tutorial for a popular site and I need to know if I should tell them to edit a warning for VS 2008 Express.

     Thanks for any responses.

  • 04-21-2008 7:21 AM In reply to

    Re: Visual Studio 2008 express edition

     Yeah, you are right.  You can still use System.Data.SQLite with Express 2008 as long as you don't need design time support.  I just built a temp app and it works fine.

    Just add the reference to it for the project and you are good to go. 

    JB 

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems