# Error Writing Tag Values Using SQLTags Provider

**URL:** <https://forum.inductiveautomation.com/t/error-writing-tag-values-using-sqltags-provider/4571>\
**Category:** Ignition\
**Created:** [June 4, 2012, 5:54pm UTC](https://forum.inductiveautomation.com/t/error-writing-tag-values-using-sqltags-provider/4571 "2012-06-04T17:54:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkiffer](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@jkiffer](https://forum.inductiveautomation.com/u/jkiffer)\
**Post date:** [June 4, 2012, 5:54pm UTC](https://forum.inductiveautomation.com/t/error-writing-tag-values-using-sqltags-provider/4571/1 "2012-06-04T17:54:01Z")

</div>

Hi,

I’m encountering a problem when trying to write tag values using a SQLTag Provider. I have a Realtime SQLTag Driving Provider running on a Linux server running Ignition 7.2.9. The tag providers are connecting to an Oracle database. I can create tags and write values on the gateway that is the driving provider. However, when trying to write tag values from a second gateway using a SQLTag provider the errors listed below are encountered and the values are not writter.

Is there something I am missing when configuring the Tag Provider?

Thanks  
Jeremy

Error returned by Designer:  
Error writing to TestTag.Value: StatusCode[Severity=Bad,Subcode=Bad\_InternalError,0x80020000]: Cannot coerce value ‘[0,Good]’ into type: class java.lang.Integer

The error displayed in the Console is:  
java.lang.ClassCastException: Cannot coerce value  
'[0,Good]' into type: class java.lang.Integer  
at com.inductiveautomation.ignition.common.TypeUtilities.coerce(TypeUtilities.java:971)  
at com.inductiveautomation.ignition.common.TypeUtilities.toInteger(TypeUtilities.java:980)  
at com.inductiveautomation.ignition.common.TypeUtilities.coerce(TypeUtilities.java:726)  
at com.inductiveautomation.ignition.gateway.sqltags.providers.DatasourceTagProvider.internalWriteValue(DatasourceTagProvider.java:109)  
at com.inductiveautomation.ignition.gateway.sqltags.execution.AbstractTagDriver.write(AbstractTagDriver.java:487)  
at com.inductiveautomation.ignition.gateway.sqltags.SQLTagsManagerImpl.write(SQLTagsManagerImpl.java:366)  
at com.inductiveautomation.ignition.gateway.project.ProjectSettingsCache$ProjectDefaultTagManagerFacade.write(ProjectSettingsCache.java:456)  
at com.inductiveautomation.ignition.gateway.servlets.gateway.functions.SQLTags$ClientWriteOperation.run(SQLTags.java:377)  
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

---

<div class="post-metadata">

**Author:** ![greg.simpson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/greg.simpson/32/3135_2.png) [@greg.simpson](https://forum.inductiveautomation.com/u/greg.simpson)\
**Post date:** [June 4, 2012, 11:46pm UTC](https://forum.inductiveautomation.com/t/error-writing-tag-values-using-sqltags-provider/4571/2 "2012-06-04T23:46:15Z")

</div>

If you can, try upgrading to the latest version, 7.2.11.

It looks like you have a string that is trying to coerce into an integer.

Check to make sure that your second gateway is just a provider and not a driving provider.

If the upgrade doesn’t help, give tech support a call so we can try to help you further.
