Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Pass through queries in MySQL?

Posted on 2004-09-30
6
Medium Priority
?
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 26

Expert Comment

by:Umesh
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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 500 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

705 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