Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Connection string for emptyStringsConvertToZero

Explorer ,
Jul 03, 2007 Jul 03, 2007
I've upgraded from mysql 4.1 to 5 and from Connector/J 3 to 5.0.6. Connector/J 3 converts an empty string into a NULL for an INT column. Connector/J documentation says emptyStringsConvertToZero=true propery must be added to connection string to get the same behaviour. I've defined given property in connection string field in CF administrator but still having Incorrect integer value: '' errors. Any ideas ?

Thanks
TOPICS
Database access
408
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2007 Jul 03, 2007
i have not tried this with emptyStringsConvertToZero setting, but some
other mysql connector settings, like useUnicode for example, work when
they are added as query string to the JDBC url, not in the Connection
String box in cf admin...

try adding ?emptyStringsConvertToZero=true to the end of the JDBC url
for your dsn (if you already have some parameters there, then use &
instead of ? (i.e. ...?useUnicode=true&emptyStringsConvertToZero=true)

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 04, 2007 Jul 04, 2007
LATEST
I am using Unicode property on connection string and it works fine but emptyStringsConvertToZero seems to have no effect.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources