tags:

views:

49

answers:

2

I am forced to use a dumb-as-nails Windows program (called IDCentre, made by Datacard, if you have the deep misfortune to use it) that says it can deal with ODBC databases.

So, I hooked it up to my MySQL database. All is well so far.

Then I noticed that it barfs when it attempts to do an update. The SQL that MySQL deems bad contains "[" and "]" as quote characters, which, of course, is what Microsoft SQL Server and Access both use.

I don't think there's a way in this awful program to change how it quotes SQL. Can I go the other way? Is there a way to make MySQL use "[" and "]" as quote characters?

+1  A: 

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

LOAD DATA INFILE. Specify the field encloser.

Fohsap
Thanks; forgot to specify this is happening in real-time.
Laird Nelson
Define real time, please. Is it hard real time, like it needs to happen instantly or fail, or is it real time in the sense that things to happen within a short, set period of time, or fail? Because if it's the latter, you could use watchdog.
Fohsap
In any event, you're probably going to want to cut up the source code-- I'm not really sure why you would want to trouble your way through all that, though. It looks like IDCenter supports other database softwares, like Oracle and Microsoft SQL Server 2k and 2k5, which are both hard real-time capable. And if you're stuck on the idea that you need to alter the source code, you might want to call Datacard. They would likely welcome a port to a new database. They also might provide you with some alternative insight to the issue. For example, it's highly likely that Wrikken figured it out.
Fohsap
Sorry, just meant that the program issues an update statement directly to the database when you change something from within the program. The update statement it issues, which I have no control over, contains brackets.
Laird Nelson
A: 

Thanks for all the input; I genuinely appreciate it.

I didn't have control over the IDCentre program, but I did wrangle control of the particular table it's writing to, and changed the table identifiers so that quotes of any kind aren't required. I was hoping and praying that maybe IDCentre would be smart enough to realize it didn't need quotes, and so hence wouldn't send brackets. Indeed that's what happened.

Laird Nelson