Hello,
Trying to build a custom scripting module and have the scripting module make connections to one of many different databases already setup inside of Ignition. I also want to try to take advantage of the default project database.
IE if I run system.mycustommodule.customscript(param1)
I want it to use the projects default database whereas if I want to run system.mycustommodule.customscript(param1, db1)
I want it to use db1 as the database.
So far I understand that the code for this would be pretty different for both gateway and client/designer scopes (vision) which means that I am limited in what I can share between the two scopes codewise (in the common artifact).
I know that I need the following code to run the query but I am missing how I can get the default connections.
SRConnect con = null;
try{
con = context.getDatasourceManager().getConnection("customdatasource");
// data logic
} finally {
DBUtilities.close(con);
}