Feedback
Did this article resolve your question/issue?

   

Article

Can't read JSON datatype using DataDirect MySQL ODBC Wire Protocol Driver 7.1

Information

 
TitleCan't read JSON datatype using DataDirect MySQL ODBC Wire Protocol Driver 7.1
URL Namecan-t-read-json-datatype-for-mysql-database-using-mysql-odbc-driver-7-1
Article Number000128731
EnvironmentProduct: Connect64 for ODBC MySQL wire protocol driver
Version: 7.10.06.239
OS: Windows 10
Database: MySQL Enterprise Server v8.0.16
Application: All supported applications
Question/Problem Description
Created a table with column of data type JSON. Able to insert some data in to the table.
When trying to read the data, it failed with the error given below in the "Error Message" section.
 
Steps to Reproduce1. CREATE TABLE t_json (F1 JSON NULL )
2. INSERT INTO t_json VAUES(' "{ ""glossary"":""1""}"' )
3. SELECT * FROM t_json
Clarifying Information
Error Message[DataDirect][ODBC MySQL Wire Protocol driver]This is either an Unknown Type or is not supported currently.
Defect Number
Enhancement Number
Cause
JSON data type is not supported by MySQL ODBC Wire Protocol Driver.
Resolution
JSON data type is not supported by MySQL ODBC driver at this time and is considered as an enhancement.

But there is a workaround for this problem which is given below in the "Workaround" section.

An enhancement to the product can be requested through the Progress Community via an Ideas submission. Customer feedback is valuable and Idea submissions are monitored by our Product Management team. Enhancement requests are reviewed during the planning phase of each new product release and a list of the enhancements chosen for implementation can be found in the Release Notes documents that accompany each release. Once an Idea is submitted the Progress Software Community will have the opportunity to comment on and vote for the Idea.

For detailed information on how to submit an Idea, please refer to Knowledge Base article   How to submit an enhancement request for a Progress product?  

 
Workaround
Use the CAST function in the query to cast JSON column to VARCHAR column. This way resultant data type of the column for this query would be VARCHAR which driver should be able to process correctly.

A simple example: SELECT  CAST(jsonCol as CHAR)  FROM ....
The above SQL statement would take the value that is in a JSON data type column jsonCol and return it as a normal char type that the driver support.
Notes
Last Modified Date11/20/2020 6:57 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.