SQLite connection

Posted by: robert on 25 January 2018, 8:15 am EST

    • Post Options:
    • Link

    Posted 25 January 2018, 8:15 am EST

    Using VS2017 ARvs11

    if I use access as the database, this works

    "Dim dbPath As String = frmMain.lblPath.Text ’ “C:\Users\Robert\Documents\Visual Studio 2010\Projects\etc…” ’

        '    Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dbPath + ";Jet OLEDB:Database Password=********"
    
        '    conn = New OleDbConnection(connString)"
    

    if I use SQLite this does not work

    Dim connString As New SQLiteConnection(connectonString)

            Dim readBankAcctData As String = "SELECT BankAcctID, BankName, TransitNo, InstNo, AcctNo, AcctDefault, AcctType, AcctDteOpened, AcctDebitNo, AcctName, AcctDteClosed FROM tblBankAccts"
            Dim cmd As New SQLiteCommand(readBankAcctData, connString)
    
            connString.Open()
    
            Dim reader As SQLiteDataReader = cmd.ExecuteReader()
            Me.DataSource = reader
    

    How do I connect my report to the SQLite database?

    Thanks

    Robert

    robert@rjenterprize.com

  • Posted 28 January 2018, 3:37 pm EST

    Hello,

    Could you please confirm are you using same connection string for SQLite as for OleDB("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dbPath + “;Jet OLEDB:Database Password=********”). If so, you need to change the connection string for SQLite because both using the different provider.

    For example:

    Dim connString As String = “user id=XX;data source=XXXXXXX;initial catalog=XXXXXX;password=XXXXXX;”

    If our assumption is incorrect, please share the connection string that you are using with SQLite and error message which is displayed on connecting SQLite.

    Thanks,

    Mohit

  • Posted 30 January 2018, 10:01 am EST

    the problem is not the connection string

    Me.DataSource = reader

    if i do a

    Dim reader As SQLiteDataReader = cmd.ExecuteReader()

            If reader.HasRows() Then
              While reader.Read
                   lblBankNameID.Text = reader("BankAcctID")
                   txtBank.Text = reader("BankName")
               End While
            End If
    

    So the issue is the Active Report reader

    Using vs: 11

    Any ideas???

  • Posted 30 January 2018, 7:22 pm EST

    Hello,

    I am unable to reproduce the issue on my end. Please refer the attached sample.

    Could you please attach your report file for me to run and reproduce the issue. Can you please specify the exact version of AR that you’re facing the issue with?

    Thanks,

    Mohit

    prj_sqlLiteDatabase.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels