Link to home
Start Free TrialLog in
Avatar of gdrnec
gdrnecFlag for United States of America

asked on

Pass through queries in MySQL?

Is there anything conceptually like a Pass-Through (access) query in MySQL?

If not does anyone know of a way to replicate tables from an external ODBC source into MySQL?

Geoff
Avatar of Umesh
Umesh
Flag of India image

Avatar of gdrnec

ASKER

That's close but I can already do table exports from access to MySQL.

What I actually need is a near real time replication from a non access ODBC source. The source is MAS200.

Any other ideas?
Avatar of petoskey-001
petoskey-001

MySql does not have the concept of pass-through queries.  The MySql client can only be used to access MySql servers.  ODBC access is not built into the clients, but is instead a separate layer on top of MySql.

As far as replicating tables from ODBC into MySql, Embarcadero has some nice products for cross-database development.
http://www.embarcadero.com/products/products.html

It depends on how automated you want everything to be.  Replication involves lots of checking for what's changed and if the source database doesn't include some sort of replication tables that say "tableX rows Y though Z have changed", then it's going to be a pretty slow procedure.  You may just want to roll your own using PERL, PHP, or some other simple language.

You say you need near real time access though.  Why do you want to use MySql instead of using the original ODBC as your data source?  PHP can use ODBC, as can most other programs.  What language are you developing in, and why is MySql needed?  

I'm trying to see the big picture.
Avatar of gdrnec

ASKER

The BIG Picture:

I have written a java program for mobile sales (pocketPC). This app communicates over the internet and synchronizes with our database at base. At present the database is in access and is very slow so I have been moving over to MySQL to get some cross vpn performance.

Here is the problem. Much of the data is resident in an accounting system called MAS200. Although MAS200 has an ODBC driver, it is so slow as to make it unusable. Up to this point I have been importing the relavent tables from MAS200 into access (which is slightly faster than the aforementioned ODBC connection).

Although this is still doable from MySQL (I can continue to import the data into MySQL from MAS200 using Access as a conduit), I really need a more elegant solution.

I may just have to write a simple replication service myself as you point out but MAS200 doesn't have any audit tables to key on so I am left with full table imports and that could be problematic. The only easy part is that it is a read only source and therefore only replicates one way (thank goodness).

I was maybe thinking about using a file image of the original MAS200 tables (kind of a btreive idea) to test for changes.....

Hoping for a solution....

Geoff





ASKER CERTIFIED SOLUTION
Avatar of petoskey-001
petoskey-001

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gdrnec

ASKER

Well,

Unfortunately, I have heard through the grapevine that Best (makers of MAS200) are considering no longer supporting and devloping for MS SQL server so I can't justify it.

I guess I wanted a miracle but failing that... Thanks for your suggestions. I better get writing.

Geoff