Syntax error when adding a sync table

10 views
Skip to first unread message

Andre Bruijn

unread,
Jul 18, 2012, 5:55:46 AM7/18/12
to perv...@googlegroups.com
Hi,

I am using MySQL as db to sync on both sides.

In the Pervasync admin tool on the page: Add New Sync Table, I want
to add a table. (pervasync/faces/schemaTableAdd.jspx)

The primary key of the table that I want to add is: Key int(10) pk_1
But that results in a syntax error.

In phpMyAdmin I also get this problem with the query:
SELECT Key FROM `test_prefixergometeralias` WHERE 1
but
I can resolve this problem by adding backtick operators:
SELECT `Key` FROM `test_prefixergometeralias` WHERE 1

I know that using Key as column name is a bad habit
but the db was once developed this way.

I also noticed that in the Subsetting Query input field on this page, I
have a predefined query like this:
SELECT Key FROM movedbnext1.test_prefixergometeralias
and
when I add here the backtick operators:
SELECT `Key` FROM movedbnext1.test_prefixergometeralias
I see that they are removed.

I watched the config file pervasync_server_mysql.conf, but I did not
find there a parameter for this case.

Do you have a solution for this or do I need to change my column name?

Thanks

perv...@gmail.com

unread,
Jul 18, 2012, 8:33:33 PM7/18/12
to perv...@googlegroups.com
Hi Andre,
 
You would have to alter the tables to use non-reserved words for column names. We admit it's a limitation on Pervasync's part. But it may do more good than harm in the long run by avoiding reserved words.
 
Thanks,
Pervasync Support
Reply all
Reply to author
Forward
0 new messages