Duplicate Index message on Link Write


De Netwerkadviseur BV
 

Hi,

I have Magic v9.4SP8 with ODBC to MySQL Database.

I have a batch task with a Link Write to the MySQL file.

New records are correctly added, but on existing records I got the message "Duplicate index" instead of opening this record like a Link Write does normaly.

Does anyone knows why this could happen?

Best regards,
André


Goose Rodriguez
 

Rule of thumb on link write. Make sure your Columns on your link write match or is the same expression on the from to and init. Just blindly make them all the same
Second. Make sure the located fields are part of your unique key


On Jan 3, 2019, at 1:06 PM, De Netwerkadviseur BV <andre@...> wrote:

Hi,

I have Magic v9.4SP8 with ODBC to MySQL Database.

I have a batch task with a Link Write to the MySQL file.

New records are correctly added, but on existing records I got the message "Duplicate index" instead of opening this record like a Link Write does normaly.

Does anyone knows why this could happen?

Best regards,
André


Govert Schipper
 

Another thing to look out for are updates (in the record suffix) of fields that are part of a unique key.


Van: main@magicu-l.groups.io <main@magicu-l.groups.io> namens Goose Rodriguez <grodriguez1@...>
Verzonden: donderdag 3 januari 2019 19:37
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] Duplicate Index message on Link Write
 
Rule of thumb on link write. Make sure your Columns on your link write match or is the same expression on the from to and init. Just blindly make them all the same
Second. Make sure the located fields are part of your unique key


On Jan 3, 2019, at 1:06 PM, De Netwerkadviseur BV <andre@...> wrote:

Hi,

I have Magic v9.4SP8 with ODBC to MySQL Database.

I have a batch task with a Link Write to the MySQL file.

New records are correctly added, but on existing records I got the message "Duplicate index" instead of opening this record like a Link Write does normaly.

Does anyone knows why this could happen?

Best regards,
André


Darren
 

Make sure that all columns that are part of the unique key have the same locate from,to and init values.


De Netwerkadviseur BV
 

Hi,

Thanks Goose, Govert and Darren.

The parameters and init are all correct. Checking from my workstation it worked fine. So it should be something different between my machine and the clients server. It appeared to be the MySQL ODBC connector.
My version 8.0 worked fine, version 5.3.11 at server side did not. Upgrading the server to 8.0 didnot succeed: Error 182/Ordinal not found. Don't know why, but doesn't matter. Downgrading to 5.2.6 did the job. All is working fine.

So MySQL Connector v5.3.11 with Magic v9.4 ODBC gateway of 08/11/2009 (mm/dd/yyyy) is not working correctly.

Best regards,
André


 

The "MySQL Connector v5.3.11" was released was release in july 2018, so 9 years after the ODBC gateway.
How do you think anyone could have tested if this is working correctly?
Especially with a tool (Magic 9.4) which is no longer supported (it's no longer mentioned here: https://www.magicsoftware.com/magic-support-center/product-lifecycle-policy/ )

If you have problems with your database, you should read about enabling the logging, seel 'Log Level' in your helpscreen (of Magic 9.4). This will always give clues about WHY things are not working.


Christof Sand
 

In MySQL ODBC Data Source configuration try this setting:

 => Details => Misc => "Prepare statements on the client"
set checkbox to on

Christof


Roman Goldenberg
 

Hi André,
do you insert string values as part of index?
if yes check uppercase, lowercase, capital characters..