This is a migrated thread and some comments may be shown as answers.

Report with SQLite works only inside visual studio IDE

4 Answers 213 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
RRE
Top achievements
Rank 2
Iron
RRE asked on 23 Nov 2010, 06:05 PM
Hi,

I use SQLite DB.
I structured my project as you suggest: a program and a class library.
Program: BackOrder
Class library: CLReport

in the CLReport I build my report: Report1.vb
The Telerik.Reporting.SQLDataSource: SqlDataSource1
have this settings:
Connectionstring: CLReport.My.MySettings.SQLiteCS
obviously on settings of CLReport I have my SQLiteCs : data source=C:\Documenti\SW\BackOrder\Data\Db.db

On page of Report1.vb every works fine: I connect to DB, see the preview, data field and so on.

The problem arrive when I try to connect from main program BackOrder.

This doesn't works:
on MainForm I have a ReportViewer: RV
with a button I call this function

Imports CLReport
 
    Private Sub Report_OrderInProd()
        Dim RP As New CLReport.Report1
 
            RV.Report = RP
            RV.RefreshReport()
    End Sub

the reportviewer display me an error: " ... (provider: SQL Network Interfaces, error 26 - Error on find server/specific instance)". (transladet from italian)

can you hel me?

Thanks

Renato

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 24 Nov 2010, 01:35 PM
Hello RRE,

We were not able to reproduce this problem on our end and this error sounds more like its coming from the SqLite than our product. Have you copied the connectionString from the app.config of the class library to the app.config of your Windows Forms project?

Sincerely yours,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
RRE
Top achievements
Rank 2
Iron
answered on 25 Nov 2010, 05:16 PM
Ciao Steve,

probably the error is here.
At a present is a WinForm application.
Also if I copy the connectionstring on main program I still have this problem:

I noted that the ConnectionString of my SqlDataSource1 is CLReport.My.MySettings.SQLiteCS and I don't have a way to transform on My.MySettings.SQLiteCS.

On your VB.ReportExamples all the SqlDataSource1 on Report are My.MySettings.TelerikConnectionString, not something like VB.ReportLibrary.My.MySettings.TelerikConnectionString, so the connection will works on the main program.

can you help me?

greetings

Renato
0
Steve
Telerik team
answered on 01 Dec 2010, 02:53 PM
Hello RRE,

In case others hit this issue, the problem in Renato's case was missing providerName attribute in the connectionString i.e. providerName="System.Data.SQLite".

Sincerely yours,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
0
RRE
Top achievements
Rank 2
Iron
answered on 01 Dec 2010, 04:38 PM
Yes, it's true.

For 'dummies' like me let to well explain :)

1) make sure that the properties of both library and project doesn't have 'root name espace'
    (go on properties, application and you have to blank the field on the right of 'Assembly name'.)

2) to make a copy of setting you have to go on app.config file of library and copy the connection string on app.config project.
    Should be something like:
    <connectionStrings>
        <add name="My.MySettings.SQLiteCS" connectionString="data source=C:\MyFolderDB\MyDB.db"
            providerName="System.Data.SQLite" />
    </connectionStrings>

    (if you enter the SQLiteCS by the property interface you will lost the provider name.

And all will works!

Thanks

Renato
Tags
General Discussions
Asked by
RRE
Top achievements
Rank 2
Iron
Answers by
Steve
Telerik team
RRE
Top achievements
Rank 2
Iron
Share this question
or