Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:10:27+00:00 2026-06-14T12:10:27+00:00

I currently have 2 ODBC connections set up on my web server. One that

  • 0

I currently have 2 ODBC connections set up on my web server. One that connects to the our enterprise QAD database and another that connects to our custom database used to extend our database. In this paticular example I have my employee records in the QAD database, and then an employee number in another table in the custom database.

Is there any way for me to set up a cross join between the two odbc connections in php so that I don’t have to loop through the results of the first query and send several queries based on the returned results to tie my records together in a php array?

The best i’ve been able to come up with is to build an IN clause from my first query from our custom database, send the second query to the QAD database, and then do an array merge in php. However, this is an extremely slow process compared to a normal SQL join.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:10:28+00:00Added an answer on June 14, 2026 at 12:10 pm

    Not sure if you’ve already found a solution to this but there is a Progress article on how to do this.

    Quick Guide To Setting Up MultiDatabase ODBC Connectivity

    I had a similar requirement – I wanted to create a join between a table in the primary QAD database and a custom table in our custom database. I have tested this and it works well although my setup is slightly different. I needed to connect to QAD from Microsoft SSRS to create reports against the QAD data – I needed to create some reports that the standard QAD report designer could not handle.

    I have tested this on Progress 10.1c (this method is only supported in 10.1b+).

    So the steps I took were:

    1. Create the oesql.properties config file as per the article relevant to the primary and custom databases.
    2. Create the ODBC System DSN on the client machine (in my case a Windows Server 2008 R2 machine running SQL Server 2008 R2 with SSRS) with the additional database references as per the article.
    3. Create a Linked Server in SQL Server via the ODBC DSN
    4. Create a view which uses the OpenQuery syntax to extract data from QAD (in my case this was created in the ReportServer database) via the linked server.
    5. Create standard T-SQL query using the view in point 3 as the data source. This was ultimately the datasource for my SSRS report.

    I believe it is important that the bit versions of the OS/Database and the ODBC drivers match but haven’t confirmed this yet.

    Whilst my requirement is different to your’s ultimately it’s the QAD server config and ODBC setup that’s key. As long as your PHP client can perform a similar capability in terms of the OpenQuery command then you may get this working. I don’t have any experience with PHP so can’t help you there.

    It seems a bit convoluted but actually works very well and in a lot of cases actually outperforms querying data using QAD browses!

    Hope this helps.

    Edit:
    Here’s a sample of an OpenQuery command – you can see that the table joins work in the normal way but just require and additional piece in the table reference.

    CREATE VIEW [dbo].[vQADData] AS SELECT * FROM OPENQUERY(LinkedServerName,
    '
    SELECT custTable.item_date AS DESP_DATE, so_mstr.so_site AS SITE, so_mstr.so_po AS PO_NO, so_mstr.so_inv_nbr AS INV_NO,
          ad_mstr.ad_name AS ADNAME, ad_mstr.ad_city AS ADCITY, ad_mstr.ad_state AS ADSTATE
    FROM customdbname.pub.customtable custTable
    INNER JOIN pub.so_mstr ON so_mstr.so_nbr = custTable.so_nbr
    INNER JOIN pub.ad_mstr ON ad_mstr.ad_addr = so_mstr.so_ship
    INNER JOIN pub.sod_det ON sod_det.sod_nbr = custTable.so_nbr
    WHERE so_mstr.so_site = ''SiteName'' AND so_mstr.so_shipvia = ''SHIPPER'' AND custTable.item_date IS NULL
    ')
    

    Then just access the view using normal SQL syntax.

    SELECT * FROM vQADData
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an MS Access application that connects to a PostgreSQL database via
I currently have one project that currently contains multiple packages. These packages make up
I have an ODBC connection to a database of which I need one table
I currently support an MS Access database that has linked connections using the Microsoft
Currently have a drop down menu that is activated on a hover (from display:none
I currently have a XSLT 2.0 Stylesheet that I am trying to remove empty
I currently have a deployed app (fortworth.herokuapp.com) that I am attempting to sort movies
We currently have one publisher and four subscribers using merge replication. Due to a
Scenario : i have a database table that is being updated frequently by some
I currently have multiple queries that query data from a few tables linked through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.