in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

error connecting to database

Last post 05-08-2008 5:42 AM by jeffreyabecker. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-06-2008 10:10 PM

    • xyzz
    • Not Ranked
    • Joined on 05-06-2008
    • Posts 1

    error connecting to database

    maindirectory = "" : maindirectory = System.AppDomain.CurrentDomain.BaseDirectory

    If Right(maindirectory, 1) <> "\" Then maindirectory = maindirectory + "\"

    m_path = "" : m_path = maindirectory + "database.db3"

    Dim m_con As SQLiteConnection = New SQLiteConnection

    m_con.ConnectionString = "Data Source=" & m_path & "; "

    m_sqlstate = "" : m_sqlstate = "SELECT * FROM table1"

    m_adapter = New SQLiteDataAdapter(m_sqlstate, m_con)

    m_cmdbuilder = New SQLiteCommandBuilder(m_adapter)

    m_dtbl = New DataTable

    m_dtbl.Locale = System.Globalization.CultureInfo.InvariantCulture

    m_adapter.Fill(m_dtbl)

    GridView1.DataSource = m_dtbl

    GridView1.DataBind()

  • 05-08-2008 5:42 AM In reply to

    Re: error connecting to database

    what exactly is the error you're getting? 

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