Change ConnectionString from MySQL

Stimulsoft Reports.NET discussion
Post Reply
mietzekotze
Posts: 39
Joined: Tue Dec 20, 2011 8:07 am
Location: Germany

Change ConnectionString from MySQL

Post by mietzekotze »

Hey

is there a possibility to change the connection string of a report before loading it?
I need to increase the timeout-time from the connection at some points (depending on which queries i execute) because some of them take quite long.
I want to pass the timeout with parameter to the script and let the script set the timeout of the mysql-query in the ConnectionString. Is there a possibility to do that?

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

Re: Change ConnectionString from MySQL

Post by Alex K. »

Hello,

You can use the following code:

Code: Select all

((StiMySqlDatabase)report.Dictionary.Databases["ConnectionName"]).ConnectionString = "";
Thank you.
Post Reply