servoy 6.4 will not recognize json column

Questions and answers regarding general SQL and backend databases

servoy 6.4 will not recognize json column

Postby stevek » Sat May 31, 2014 3:25 am

Hello all

I have upgraded to Postgresql-9.3 to take advantage of the json features within the database.

I created a column "referral_json" with the data type as json

I can write queries to insert jsons into the column, and run queries to find data within the json using psql and PgAdmin with no problems.
However, when I start up Servoy to view the table and column, the column lists as "text" and I cannot write json data from within Servoy to that column.
I even modified the column within Servoy to 5000 characters since I could not adjust the type to json within servoy. Even then, it will only populate the first 8 (if I remember correctly) characters then errors.

There currently is a varchar (5000) column that the json text is captured in.
The data comes in and Velocity Reports slings the json into the text column "referral_data".

What I would like to to is add a method that would also place it in the json column at the same time. When I know it is working flawlessly, I can remove the velocity reports functions and capture the json directly into the database.

Can someone assist? If I need to provide more information I will gladly do so.

I just want servoy to "see" the json column I created within Postgresql and be able to write json data to it.

Thanks
stevek
 
Posts: 53
Joined: Thu Jan 25, 2007 7:19 pm

Re: servoy 6.4 will not recognize json column

Postby Adelo Herrero » Sat May 31, 2014 8:09 am

Hi:

First, I have not used this feature of postgresql (very interesting) but I think that can you try the next:

If you uses getDatasetByQuery with a sql query, what result get it? If this is a string with json format, can you serialize and create a dataset with the resultant object.

If this not result and you only use Postgres, can also create in the database one procedure that receive the parameter to sql compose and return in a "compatible" format to Servoy. The call to a procedure is by "select" command, therefore, from Servoy also we can calling it with getDataSetByQuery.

Please, if this work (more or less) fine, you tell us ;-)

Best regards,
Adelo Herrero
Adelo Herrero
 
Posts: 103
Joined: Sat Jul 25, 2009 9:24 pm
Location: Requena (Valencia) España

Re: servoy 6.4 will not recognize json column

Postby ROCLASI » Sat May 31, 2014 11:03 am

Hi Steve,

stevek wrote:Even then, it will only populate the first 8 (if I remember correctly) characters then errors.

What is the exact error ?
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 4 guests

cron