# Named parameters

**URL:** <https://forum.inductiveautomation.com/t/named-parameters/99966>\
**Category:** Module Development\
**Tags:** ignition81, database\
**Created:** [December 17, 2024, 11:45pm UTC](https://forum.inductiveautomation.com/t/named-parameters/99966 "2024-12-17T23:45:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grace\_Gan](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Grace\_Gan](https://forum.inductiveautomation.com/u/Grace_Gan)\
**Post date:** [December 17, 2024, 11:45pm UTC](https://forum.inductiveautomation.com/t/named-parameters/99966/1 "2024-12-17T23:45:06Z")

</div>

At the moment I have something like this

```python
    String sqlScript = loadSQLScript("oee_summary_query.sql");
    PreparedStatement stmt = connection.prepareStatement(sqlScript);
    // Set the parameters for the placeholders
    stmt.setString(1, start_date);
    stmt.setString(2, end_date);

```

In the query I have positional placeholder `?` that gets its value through the `stmt.setString()`, Is it possible in ignition module development to have named parameters so in the script I can define `:start_date` instead of `?` and is there a function I can call to set all `:start_date` to var `start_date`?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 17, 2024, 11:50pm UTC](https://forum.inductiveautomation.com/t/named-parameters/99966/2 "2024-12-17T23:50:15Z")

</div>

No. JDBC only supports question mark placeholders. Colon-delimited placeholders are supported in Ignition named queries using text search/replace (-ish), not anything at the JDBC layer. (Non-public implementation.)

---

<div class="post-metadata">

**Author:** ![Grace\_Gan](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Grace\_Gan](https://forum.inductiveautomation.com/u/Grace_Gan)\
**Post date:** [December 17, 2024, 11:51pm UTC](https://forum.inductiveautomation.com/t/named-parameters/99966/3 "2024-12-17T23:51:42Z")

</div>

Is question mark placeholders the only (and best) way to input parameters to sql script then?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 18, 2024, 2:56am UTC](https://forum.inductiveautomation.com/t/named-parameters/99966/4 "2024-12-18T02:56:19Z")

</div>

Yes, and yes.
