Alberto Vinciguerra Posted June 8, 2022 Share Posted June 8, 2022 Hello, this is myIronPython script where... I'm connectin to my sql database (MariaDb) using odbc driver! from Spotfire.Dxp.Data.Import import DatabaseDataSource from Spotfire.Dxp.Data.Import import DatabaseDataSourceSettings from Spotfire.Dxp.Application.Scripting import ScriptDefinition from ........ import clr connStr = "System.Data.Odbc" dbConn = "driver=MySQL ODBC 8.0 Unicode Driver;Server=myserver;Database=mydb;UID=myUser;PWD=xyz;port=3306" sqlCommand = "delete from mytable where Shift_Date = current_date()" dbsettings = DatabaseDataSourceSettings(connStr, dbConn, sqlCommand) ds = DatabaseDataSource(dbsettings) newDataTable = Document.Data.Tables.Add("temp",ds) Document.Data.Tables.Remove(newDataTable) Error is in: Document.Data.Tables.Add("temp",ds) ------------------- Failed to execute data source query for data source "". ---------------------------- Link to comment Share on other sites More sharing options...
Tutika Vaibhav Sai Thirumalesh Posted October 18, 2022 Share Posted October 18, 2022 Hi Were you able to resolve this issue ? Link to comment Share on other sites More sharing options...
Alberto Vinciguerra Posted October 18, 2022 Author Share Posted October 18, 2022 Hello, I solved (without suggestions) in june, my error changing the dbConn connection string. Link to comment Share on other sites More sharing options...
Tutika Vaibhav Sai Thirumalesh Posted October 18, 2022 Share Posted October 18, 2022 i am using SQL DB and facing the same issue any suggestions please. Link to comment Share on other sites More sharing options...
Alberto Vinciguerra Posted October 18, 2022 Author Share Posted October 18, 2022 this is the old connection string:connStr = "System.Data.Odbc"that is my new connection string. It works fine...connStr = "System.Data.odbc"odbc is lower caseNo more changes in my code! Link to comment Share on other sites More sharing options...
Tutika Vaibhav Sai Thirumalesh Posted October 18, 2022 Share Posted October 18, 2022 Thank You. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now