Page 1 of 2
StiMySqlDatabase does not contain a constructor that takes 5
Posted: Tue May 26, 2015 6:41 am
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.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Wed May 27, 2015 11:52 am
by Alex K.
Hello,
Please try to download from the site last dataadapter and compile it with new version.
Thank you.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Wed May 27, 2015 6:00 pm
by grahampcharles
I have already done that, as I mentioned:
> I am also using the new 2015 MySqlDatabase component.
Any other ideas?
g.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Wed May 27, 2015 6:32 pm
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.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Thu May 28, 2015 6:27 am
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.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Fri May 29, 2015 12:46 am
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?
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Fri May 29, 2015 7:14 am
by Alex K.
Hello,
Sorry for the misunderstanding. We found that on our site placed not latest version of data adapters.
Thank you.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Fri Jun 12, 2015 7:40 am
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!!
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Fri Jun 12, 2015 10:15 am
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.
Re: StiMySqlDatabase does not contain a constructor that tak
Posted: Mon Jun 15, 2015 7:44 am
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