Solved

Pass through queries in MySQL?

Posted on 2004-09-30
6
276 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
ID: 12197477
0
 
LVL 4

Author Comment

by:gdrnec
ID: 12198881
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
ID: 12199342
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Author Comment

by:gdrnec
ID: 12200080
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
ID: 12201266
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
ID: 12201706
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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