Jump to content


Photo
- - - - -

Connecting to multi SQL database


3 replies to this topic

#1 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 03 August 2004 - 05:49 PM

Dear Gang,

I'm having trouble connecting to 2 different SQL databases at once in one ProIV application.

What I have done is this:

pro4.ini

[database - SQLDEFAULT]
PRODB_CHARSET=7
SQL_DBNAME=ATC
FILETYPE=SQLSERVE
CONNECTION=atc/atc

[database - OTHER]
PRODB_CHARSET=7
SQL_DBNAME=OTHER
FILETYPE=SQLSERVE
CONNECTION=atc/atc


I have a file called TEST that has an alternate file def of %OTHER%TABLENAME.

When I look at the TEST file, it is always pointing to the local database - not the other database.

I know that the DNS names are good because if I put all the settings from OTHER into DEFAULT, then the whole app reads the other database. I've been through a number of different permutations, but cannot read both databases at once.

Has anyone tried and succeeded at this?

Regards,

Joseph

#2 Wim Soutendijk

Wim Soutendijk

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 211 posts
  • Gender:Male
  • Location:Netherlands

Posted 04 August 2004 - 06:39 AM

Try the following:

In the [database - OTHER] section change
CONNECTION=atc/atc
to
CONNECTION=atc/atc/other

#3 Guest_Tight Sheep_*

Guest_Tight Sheep_*
  • Guests

Posted 04 August 2004 - 07:58 AM

Joseph,

we access tables owned by several different database, but we define one schema that is used by the Pro-IV application. That schema contains all of the database links and synonyms are defined in this schema pointing to all the tables required.

The schema only holds synonyms no actual tables reside there.

For Pro-IV it is invisible, no settings required for separate databases.


We are using Oracle, dont know if this works for other databases.


TS

#4 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 04 August 2004 - 01:28 PM

Wim,

Thanks that did it.

General FYI... The ALIAS command did not work with multiple databases until I upgraded to 5.5 340.


Tight Sheep,

Thanks for the info. It looks like the %other_dbase% setup will work fine.

I would inquire as to the meaning of your alias, but I can only fear what the answer is.

Regards,

Joseph



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users