How to add database using code?
Posted: Wed Apr 01, 2020 6:03 am
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)
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)