StiMySqlDatabase does not contain a constructor that takes 5

Stimulsoft Reports.NET discussion
grahampcharles
Posts: 7
Joined: Sat May 19, 2012 5:59 pm

StiMySqlDatabase does not contain a constructor that takes 5

Post by grahampcharles »

I recently updated from version 2012.1 to 2015. I am also using the new 2015 MySqlDatabase component.

Now my reports are failing to run in the Designer (or in runtime) -- I get an error "StiMySqlDatabase does not contain a constructor that takes 5 arguments" (and a similar error on StiMySqlSource -- but 8 arguments).

The Report Checker takes me to these lines of auto-generated code:

Code: Select all

 
public dataSourceNameDataSource() : 
    base("Connection1", "dataSourceName", "dataSourceName", "", true, false, 30, null)
 {   }
and

Code: Select all

this.Dictionary.Databases.Add(
    new Stimulsoft.Report.Dictionary.StiMySqlDatabase("Connection1", "Connection1", "SERVER=servername;UID=username;PWD=password;DATABASE=databasename;PORT=3306;", false, null));
Any advice on how I can make my MySql data sources work with Reports.Net 2015?

Thanks,

g.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiMySqlDatabase does not contain a constructor that tak

Post by Alex K. »

Hello,

Please try to download from the site last dataadapter and compile it with new version.

Thank you.
grahampcharles
Posts: 7
Joined: Sat May 19, 2012 5:59 pm

Re: StiMySqlDatabase does not contain a constructor that tak

Post by grahampcharles »

I have already done that, as I mentioned:

> I am also using the new 2015 MySqlDatabase component.

Any other ideas?

g.
grahampcharles
Posts: 7
Joined: Sat May 19, 2012 5:59 pm

Re: StiMySqlDatabase does not contain a constructor that tak

Post by grahampcharles »

OK, it seems you left out some constructors from your MySql adapter code, the ones that support the extra `string key` parameter you've added. I downloaded the latest from this page: < http://www.stimulsoft.com/en/downloads/database-packs >. Then I added these two constructors:

Code: Select all

        
        /// <summary>
        /// Creates a new object of the type StiMySqlDatabase, accepting an unknown fifth parameter.
        /// </summary>
        public StiMySqlDatabase(string name, string alias, string connectionString, bool promptUserNameAndpassword, string key)
            :
            base(name, alias, connectionString, promptUserNameAndpassword, key)
        {
        }


        /// <summary>
        /// Creates a new object of the type StiMySqlSource, accepting an unknown fifth parameter.
        /// </summary>
        public StiMySqlSource(string nameInSource, string name, string alias, string sqlCommand, bool connectOnStart, bool reconnectOnEachRow, int commandTimeout, string key)
            :
            base(nameInSource, name, alias, sqlCommand, connectOnStart, reconnectOnEachRow, commandTimeout, key) 
        {
        }

Rebuilt, and now everything works as it should. Patch time maybe? Or did my wires get crossed somewhere?

g.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiMySqlDatabase does not contain a constructor that tak

Post by Alex K. »

Hello,

In the last version was changes in the databases and in adapters. You need use the constructors with additional parameter "key".

Thank you.
grahampcharles
Posts: 7
Joined: Sat May 19, 2012 5:59 pm

Re: StiMySqlDatabase does not contain a constructor that tak

Post by grahampcharles »

> In the last version was changes in the databases and in adapters. You need use the constructors with additional parameter "key".

Yes, I needed those constructors, which is why I had to write them myself. Are you not understanding me? YOUR CODE -- AS POSTED TODAY -- DOESN'T HAVE THE CONSTRUCTORS. I had to fix your adapter code. Your code is *broken*. Ponyatno?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: StiMySqlDatabase does not contain a constructor that tak

Post by Alex K. »

Hello,

Sorry for the misunderstanding. We found that on our site placed not latest version of data adapters.

Thank you.
Attachments
Capture.PNG
Capture.PNG (78.93 KiB) Viewed 2726 times
rksaskia
Posts: 58
Joined: Fri Apr 27, 2012 9:16 am

Re: StiMySqlDatabase does not contain a constructor that tak

Post by rksaskia »

The Solution don't work.
The Engine produce code with a Constructor with 8 parameters:
this.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSQLiteDatabase("SaskiaReport", "SaskiaReport", "Data Source=C:\\...\\SASKIAREPORT.s3db;Journal Mode=Off;Synchronous=Off;", false, null));

I try to add the constructor in SQlite-Database-Package:
public StiSQLiteDatabase(string nameInSource, string name, string alias, string sqlCommand, bool connectOnStart, bool reconnectOnEachRow, int commandTimeout, string key)
:
base(nameInSource, name, alias, sqlCommand, connectOnStart, reconnectOnEachRow, commandTimeout, key)
{
}

I get the error:
Fehler 2 'Stimulsoft.Report.Dictionary.StiSqlDatabase' enthält keinen Konstruktor, der 8-Argumente akzeptiert. (StiSqlDatabase has no constructor with 8 parameters)

The base-class has no such constructor!!

What is the solution? Please help!!
Attachments
stimulsoft.JPG
stimulsoft.JPG (136.67 KiB) Viewed 2718 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: StiMySqlDatabase does not contain a constructor that tak

Post by HighAley »

Hello.

Sorry, but you are trying to add a constructor of StiSQLiteDatabase with arguments from StiSqlSource.
StiSQLiteDatabase has no such arguments. Do you need to add constructor for SQL Database or SQL Source?

Thank you.
rksaskia
Posts: 58
Joined: Fri Apr 27, 2012 9:16 am

Re: StiMySqlDatabase does not contain a constructor that tak

Post by rksaskia »

Hello,
what I need? I need a working SQLite-Support!

The focus of development is too much on BI-Server.
QM out of order?

Greetings
Post Reply