How to add database using code?

Stimulsoft Reports.WEB discussion
Post Reply
Lobjey
Posts: 8
Joined: Tue Mar 24, 2020 6:55 am

How to add database using code?

Post by Lobjey »

I add a database in the .cs file,it can be shown on the page,but if I click "New query" button,there ia an error in the js.Can someone help me?

var oracleDb = new StiOracleDatabase("TestOracle", "TestOracle", "Data Source=*****;user id=*****;password=****;");
report.Dictionary.Databases.Add(oracleDb);

Uncaught TypeError: Cannot read property 'typeConnection' of undefined
at BfDesigner.aspx?msgid=1234&stiweb_component=Designer&stiweb_version=2017.1.10&stiweb_action=Resource&stiweb_data=AllNotLoadedScripts:11461
at StiMobileDesigner.ExecuteScript (BfDesigner.aspx?msgid=1234&stiweb_component=Designer&stiweb_version=2017.1.10&stiweb_action=Resource&stiweb_data=DesignerScripts:10071)
at StiMobileDesigner.InitializeEditDataSourceForm (BfDesigner.aspx?msgid=1234&stiweb_component=Designer&stiweb_version=2017.1.10&stiweb_action=Resource&stiweb_data=DesignerScripts:10133)
at HTMLDivElement.newQuery.action (BfDesigner.aspx?msgid=1234&stiweb_component=Designer&stiweb_version=2017.1.10&stiweb_action=Resource&stiweb_data=AllNotLoadedScripts:11460)
at HTMLDivElement.button.onclick (BfDesigner.aspx?msgid=1234&stiweb_component=Designer&stiweb_version=2017.1.10&stiweb_action=Resource&stiweb_data=DesignerScripts:19081)
Lech Kulikowski
Posts: 7339
Joined: Tue Mar 20, 2018 5:34 am

Re: How to add database using code?

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
Post Reply