Jump to content


Photo
- - - - -

SQL_DBTYPE


6 replies to this topic

#1 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 15 May 2006 - 01:54 PM

Simple question,

is there something like &$@~SQL_DBTYPE or similiar ?

Reason I ask is we are developing 2 sets of boots side by side. One Pro-Isam and the other Oracle.

The only way that we could think of, was to read FILEDEF and from there see what the file/table is

#2 Joseph Bove

Joseph Bove

    ProIV Guru

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

Posted 15 May 2006 - 01:58 PM

Neil,

This may not be the best solution, but we put a system flag in our application.

hth,

Joseph

#3 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 15 May 2006 - 02:11 PM

Thought of doing the same.

Guess its one more Valuable Variable that will have to be added and maintained :eek:

#4 mdexter

mdexter

    Advanced

  • Members
  • PipPipPip
  • 70 posts
  • Gender:Male

Posted 15 May 2006 - 11:23 PM

Maybe I'm missing something, but you can read the FILETYPE environment from the PRO4.INI file (or whichever user file is controlling this session) using the syntax $X = &$@~FILETYPE. Would that tell you whether you were in the Oracle or PRO-ISAM environment? HTH. Mark Dexter

#5 Mike Schoen

Mike Schoen

    Expert

  • Members
  • PipPipPipPip
  • 198 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 16 May 2006 - 01:07 PM

We are in the process of adding mssql support allong-side of oracle, and we use &$@~SQL_DBTYPE successfully.

We also wrote a global logic called DBTYPE(), just because its easier to type....

#6 Neil Hunter

Neil Hunter

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 414 posts
  • Gender:Male
  • Location:Johannesburg, South Africa

Posted 17 May 2006 - 08:18 AM

Came up with a crazy solution.

In our Environment section of our ini file, we added a new entry called FILE_TYPE and assigned an arbitrary value.

Ran a test function displaying the value of &$@~FILE_TYPE. Guess what, its the arbitrary thats displayed :eek:

#7 mdexter

mdexter

    Advanced

  • Members
  • PipPipPip
  • 70 posts
  • Gender:Male

Posted 18 May 2006 - 05:51 PM

We use several of our own environment variables in PRO4.INI file as flags in the application. It seems to work fine. Mark



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users