Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Master/Detail Report using Paradox and MSSQL

edited March 2002 in General
Dear Sir,
Being new to RB, I am having trouble
generating a report. We
access a paradox file by passing a parameter to an SQL
statement then pass
this same parameter to a stored procedure (which
involves a JOIN) in an ADO
dataset to retrieve more data from the MSSQL 2000
database. All files are in
a datamodule. I have done it this way as using the
datasource of the paradox
file as the datasource for the ADOdataset does not
appear to work.
What is the best or correct way of doing
this as most of what
I have tried does not work.
Any help will be appreciated.
Regards,
Clive Shaw

Comments

  • edited March 2002
    You will need two ADOConnections.

    The first connection will connect to the SQLServer by building a connection
    string using the OLE DB Provider for SQL Server.

    The second connection will connect to Paradox with the ODBC driver as the
    provider. Let's connect to DBDemos as a test:

    1. Launch the Data Link Properties Dialog by double clicking on the
    ADOConnection.

    2. Set the Provider to be the Microsoft OLE DB Provider for ODBC Drivers

    3. Select the Connection tab of the Data Link dialog

    4. Specify the source of data by using a connection string (Build).

    5. Create a new DSN for DBDemos in C:\Program Files\Common Files\Borland
    Shared\Data\DBDemos.DSN

    6. Check the directory shown in the ODBC Paradox setup dialog to be the same
    as shown in step 5.

    7. Select 'OK' in the ODBC Paradox setupdialog and return to the Data Link
    Dialog

    7. Do not enter a username and password

    8. Select the path for the initial catalog to use from the drop down list.

    9. Test Connection.

    Now you should be able to connect to DBDemos via ADO. Surf this example for
    a demo. Note: You'll have to build the ADOConnection to Northwinds, but the
    Paradox ADOConnection should be able to point to your DBDemos tables as they
    are installed with Delphi)

    http://www.digital-metaphors.com/tips/ADOLinkParadoxToSQLServer.zip



    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.