Solved

Pass through queries in MySQL?

Posted on 2004-09-30
6
270 Views
Last Modified: 2008-03-03
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
0
Comment
Question by:gdrnec
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:ushastry
Comment Utility
0
 
LVL 4

Author Comment

by:gdrnec
Comment Utility
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?
0
 
LVL 7

Expert Comment

by:petoskey-001
Comment Utility
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.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 4

Author Comment

by:gdrnec
Comment Utility
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





0
 
LVL 7

Accepted Solution

by:
petoskey-001 earned 125 total points
Comment Utility
I don't suppose there is any chance you could upgrade to MAS200 SQL?  It uses a MS SQL server and should make the replication you want to do a lot easier, and probably get rid of the need for MySql.  Plus for pocketPC you can use MsSql Server for CE with the built-in replication.  It requires that you setup an IIS server between your DB and handheld, but it works well for basic replication.

Failing that I would write an Access application with VB script to perform this data import at startup and then set it up to run automatically every hour or so.  
0
 
LVL 4

Author Comment

by:gdrnec
Comment Utility
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
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now