Database parameter type not showing up (named query)

Hi
I’m trying to pass the ‘database name’ as a dynamic parameter when executing my named query but when I select the option on the Database Connection dropdown (Authoring page) I’m not seeing the database parameter type as explained in the manual.

Has anyone had this same issue? I have multiple database connections configured on the gateway.

Thanks a lot in advance!

Sam

Make sure that you have saved your project after you set up the Named Query; named Query resources do not display changes to Perspective until after the Named Query resource has been saved.

I verified that when I set up a Named Query with a parameterized database that the Named Query binding dialog does supply the database as an expected parameter once the Named Query which expects the parameterized database is selected.

My Named Query:

Screen Shot 2021-04-07 at 9.37.32 AM

Binding dialog after selecting ExpectsDBAsParam:

Thank you @cmallonee, you have saved me once again. Not all heroes wear capes.

In order to get the list of databases configured, I believe I can use the system.db.getConnections() ?

Cheers
Sam

1 Like

Yes, that should get you a DataSet which contains information about the currently configured databases.

1 Like

Have you seen Named Queries with the database parameter not binding? I split a project and now half my queries will not use the provided parameter.

It seems that in the newer and newest versions if ANY parameter bound to a custom property is missing then the named query will complain that the database parameter is missing. This sends you on a tangent/wild goose chase.

@jcaudle Thanks for that info, there has been multiple incidents of me diving into a rabbit hole with Ignition haha

1 Like