OpenROAD

Frequently Asked Questions (FAQ)

Net Trawlings

Page Last updated: 24th May 1998

Archived at ftp.naiua.org

Copyright (C) 1997 by Pat McGibbon

This document is COPYRIGHTED to control its distribution and to prevent it from being used for profit. PLEASE DO NOT DISTRIBUTE IT WITHOUT THIS DISCLAIMER OR THE COPYRIGHT NOTICE. Replication of this document by any means is explicitly encouraged, provided that the content is not altered in any way.


Disclaimer

This document is not an official CA product information release. They know nothing of its contents. Well, I hope they know something about the subject, but you know what I mean. It is a voluntary effort by many contributors, co-ordinated by me.

Their respective employers are in no way responsible for the content of this FAQ. Nothing in this FAQ should be regarded as true. Any item of information may become obsolete or out of date at any time. Information about undocumented features should always be regarded as potentially harmful.

The co-ordinator, contributors, and distributors of this document make no representations as to the correctness of the information contained herein, and make no promises to correct any errors or omissions. You use this information at your own peril.

Pat McGibbon pat@megadata.demon.co.uk
MegaData Ltd.,
Dairy Cottage,
High Street, MeonStoke Tel: 0(044)1489 877887
Southampton SO32 3NH
UK


Net Trawlings.

The final part of the FAQ is made up of things that I have lifted from comp.databases.ingres, by sniffing around www.dejanews.com. I have freely edited what I found, and removed most references to the material's originators, so it may be advisable to treat it with an even greater degree of caution than the rest of the FAQ.


Connecting to more than one type of database from the same application.

We have data residing in CA-INGRES databases and ORACLE database. We would like to use an OpenROAD application to access data from both databases concurrently. We were told that an OR app could only connect using a single driver to the backend. Assuming I am running on a platform that has CA-OpenROAD drivers for INGRES and ORACLE, is there a way to have a single app access data from both backends? Would a gateway help the situation?

You cannot use both drivers at once, so a gateway might be the solution. Or you could call a 3GL module from the O/R app that would make ODBC calls to access data in one system, while you use the driver to access the other.


How do I assign a script to a dynamically created object?

If I have created an object dynamically (at runtime) on my frame, and I want to also create script code for that object dynamically, how do I get the frame to recognize the script that I have assigned to that object, i.e. When I click on a dynamic menubutton within a ControlButton, I want to display a message.

You cannot get the frame to admit the existence of code behind a dynamically created button.

If all you want to do is put out a message, try setting the clienttext of each dynamic button to the required message text, and parenting the button at runtime to a prepainted composite whose code says:

ON CHILDCLICK =
DECLARE
btn = ButtonField;
Cf = CompositeField;
ENDDECLARE
BEGIN
Cf = FIELD($_CurFld);
 
Cf.ChildFields.Find(Attributename = 'Class', Value = 'ButtonField',
RowNumber = BYREF(ct));
/* just in case there are any other fields in here... if there are
other button fields then search on some other distinctive attribute */
 
btn = Cf.ChildFields[ct];
Message btn.ClientText;
 
END;

If you want to do more than just a message, then the composite code could look more like:

ON CHILDCLICK =
DECLARE
ENDDECLARE
BEGIN
CallProc DynProc#1();
END;

Then you can dynamically create DynProc#1 as a 4gl procedure.

There are a few steps to remember when creating a dynamic procedure like parenting it to the application, and setting its IsStale to TRUE so that it will be recompiled. For a short procedure this is still subsecond the first time you invoke it and sub millisecond thereafter.


Compatability between platforms

We recently installed some NT 4.0 workstations with the OpenROAD development tools from the 'OpenIngres 1.2 for Microsoft Windows NT' CD ROM.

Although the OpenROAD release is still 3.5/02, the images built with this release are NOT backwards compatible for OpenROAD 3.5/02 on Win 3.11 or Win95.

This is the first time we experience incompatibility in images for Windows 3.11, 95 and NT. Has anyone seen the same problem ?

Yup. I've got a windows 3.1 box sitting around just to make images for one client who hasn't completely upgraded yet.


E_LQ004B Repeated query 'mdbcache1' is not defined.

I have been happily developing my OpenROAD Application with 6 components. I am using OpenROAD 3.5 on a WindowsNT platform interfacing to an Alpha running openVMS and OpenIngres 1.2.

Yesterday I failed to retrieve definitions for any of my components. It appears to be a protocol response error from the database. The error is

E_LQ004B Repeated query 'mdbcache1' is not defined.
Unexpected protocol response when reading query identifier.

I have tried exporting, then importing my application. To no avail.

This should be solved by an ingsetenv command on the NT machine in a DOS shell.

ingsetenv II_GCC_MESSAGE_CONCAT FALSE

This is hidden away in the release notes. Once it occurs is seems totally to confuse iigcc so the Ingres clisnt must be restarted.


Use of SQLSelect

I would greatly appreciate someone emailing me sample code for loading an array (not a tablefield) from an SQLSelect object using the TargetArray attribute.

I think I have got the syntax right, but my client session keeps crashing every time I run it. My server is running OpenIngres 1.2 under NT 4.0, client is running OpenROAD 3.5 under NT 4.0. Maybe its just an NT thing!

I don't have any sample code for SQLSelects, but a couple of things to watch out for is that you set the TargetArray attribute fairly late, and that it is a reference to an existing non-null array.

Then set the scope in which you would like the WhereClause references et al to be interpreted, and away you go.

The final countdown should look something like...

5 (for dramatic effect only)
4 Set TargetArray
3 Set Scope
2 if state = active then close
1 open
BANG!! (9 times out of 10)

At least all of the above holds for QueryObjects, so I am assuming it is also true for SQLSelects.

BTW, since SQLSelects are just as painful as QueryObjects, but with fewer paybacks, why not use QO's any way and leave your options open for the future...?

Also, it may be worth considering writing yourself a QueryObject/SQLSelect 'painter', to help avoid all those nasty little syntax errors which are so accurately reported when the whole thing comes crashing down for the hundredth time. You can get quite a long way, quite quickly; you'd be surprised...


InstallShield for OpenRoad.

We develop programs with OpenROAD that retrieve data from an Ingres database. We want to create setup routines for our programs that should do the installation of IngresNet, OpenROAD runtime libraries and applications in one singe step.

We think about using InstallShield Express which is shipped with Delphi 2.0 and 3.0. Has anybody any experience with that?

We have already created a setup routine for testing purposes and encountered the following problem: NETU.EXE could not add a global vnode (private vnodes worked). The problem did not occur on every PC. Some worked fine. All PCs had a "naked" Windows 95 with only the TCP/IP stack installed. Could I have forgotten something (changes in INI-Files, Registry) which the original IngresNet setup on the OpenROAD CD does.

We use Win95 and OpenROAD 3.5

One of my colleagues gave a presentation on this subject at CA-World. You can get his slides (and his full Installshield script) at: http://gsbsds.uchicago.edu/CA_world


Fonts in OpenROAD

Has anybody tried to use the II_W4GL_MENUFONT variable in OpenROAD 3.0 HPUX ?

I've found a couple of links about this variable in Language Reference Manual. All links point me to Application Editor User's Guide. But there is nothing there about it (at least in the book I've got).

I have additional frustration. I've been trying to fix a font problem. I have an HP-700 Model 712/60 Workstation running HP Vue. When I start OpenROAD and after the flash screen appears the Application Catalog font is VERY, VERY small and virtually unreadable. I've set the II_FONT_CONVENTION to X11R3 and X11R4 to no avail -- even tried X11R5 (which caused a core dump). Is this a UNIX or OpenROAD issue? Would setting II_W4GL_MENUFONT help?

This is embarrassing since I've been working with OpenROAD since the SAPPHIRE beta days in 1990, but alas, my VAXStation disappeared long ago....

After significant fiddling with the various available configuration files and environment variables, we got things to work in an acceptable way. This has been applied to both the HP-UX (HP-Vue) and Solaris versions of OpenROAD.

II_W4GL_MENUFONT affects the size of the font only in the drop--down menus used in the catalogs and the various other screens. This does not affect the size of fonts _on_ the catalogs or screens.

Solution 1: Try setting the II_FONT_CONVENTION variable to x11r4 or x11r5. The variable II_FONT_FILE must be unset. See if that works, it should. If not there is an alternate solution.


Solution 2: Specify directly the fonts OpenROAD is to use via II_FONT_FILE. Note in this case, it appears that OpenROAD insists on using the smallest font it knows about to display the objects on the catalogs.

To get bigger (that is, readable) fonts, make a copy of the x11r4.ff file and edited it to set the definition of the TF_SYSTEM font for each of the 2 smallest sizes to 120 instead of 80 and 100. It seems to me that on the higher resolution monitors generally used on Unix workstations, that the 8 point fonts are too small to use anyway. You can adjust the sizes as desired, personally I hate eye-strain. Once you have made a new x11r4.ff, then you must set II_FONT_FILE to the full path and new file name. The only ill affect that I have found is that in some properties sheets and a couple of other places, the text is too big to be displayed in the allocated area. We setup this and a bunch of other environment variables related to Ingres and OpenROAD in a special Ingres User Environment file. I have actually also set the smallest font sizes bigger in all fonts because I found the smallest fonts (80) to be unusable for anything.


The best resources I've found for most of this information is in the 'Getting Started' book and in the bound 'Release Notes' book.


Code generator for OpenROAD

I' m looking for a rapid development tool that can generate source code for OpenROAD. I'm thinking about something like VISION , but for OpenROAD ...

Try the Westmount CASE tool, I believe it is capable of generating most, if not all the OpenROAD code for an application.


Accessing SQL Server on NT from SunOS OpenROAD app

Is it possible to make an OpenROAD SunOS application access an SQL Server database on an NT machine? If yes, what software do we need to be able to do that?

Your OpenROAD app for NT will require that you re-image your OpenROAD apps (makeimage). You will need to OpenROAD to SQL-Server drivers...and no Ingres Net product needs to be installed since SQLServer uses WinSock.


32k limit on scripts

I am led to believe there is a limitation of 32kb on the script size that can be loaded into the OpenROAD debugger. Can this limitation be overcome and if so how?

Seems this problem just won't go away ...

The problem exists for Win3.1 and Win95 OpenROAD. The problem is the editor OpenROAD uses has the physical limitation - not the operating system.

I logged a call with CA some time ago (24th Oct 96 BUG 76800) and alas there is some relief out there..

A patch has been made to win 3.1 platform and Win95 (where the problem is also evident) to allow for the processed script to be written to a file that allows you to use another editor to view the script for any obvious errors.

Changing the default editor still dosn't give you access to the debug stepping features :

You have some options to resolve this issue : they are :

  1. Upgrade your development machines to run NT. Under NT all scripts and debug works fine with very large programs we are at 4007 lines at present in one program. Images made under NT can be run directly on win 3.1 and win95.
  2. Get a beta copy of vers 4 of OpenROAD - Care should be taken here though... Because the existing version is not upwardly compatable (and not it should be) then procedures frames etc taken into ver 4 will not be able to br run in the old version again. So you will need to set up a seperate mirror database and export from your existing database and import to the ver 4 one. This may be a time consuming angle but it is an option.
  3. Cut your code size down by seperating the code into sections then use the #include command to include the code into your programs providing they don't go over the 32k limit. This will allow you to debug each of the included sections seperately but not together. (well almost there)

We have been running development on NT and porting to win3.1 for quite some time now and it works and would be the recommended solution providing your developing on a Pentium 75 win 40megs memory or greater running a decent size disk >500megs.


Background colour for tablefields.

I can't seem to be able to set a table column's background color in script. Sample code used is

field( My_tbl[*].AColumn ).BgColor = CC_PALE_GRAY;

Does anyone know how to achieve the desired solution, without resorting to setting each individual cell within a WHILE loop?

Have a look at the documentation of the ProtoField attribute of the ColumnField. I only have the Windows4GL documentation here, but it explains just setting the background color as an example.

Your code should probably look like:

EntryField(FIELD(My_tbl[*].AColumn).ProtoField).BgColor = CC_PALE_GRAY;


iigcc exits immediately

I just installed my OpenROAD 3.5 and I created a new database to start development in. I'm running Windows 95 on a P75 with 32mb of ram. For some reason the iigcc program exits as soon as it starts, leaving only iigcn in the process list. So, I can't define any remote nodes as they don't seem to save, and everytime I try to connect to the database (to do the UpgradeF), I get the 'no communications server in this installation' message.

Does anyone have any idea why iigcc is quiting? Following is the error that I get. Do I have to somehow set myself up as a superuser (my network login under windows is my name, 'Jason Badry': (as a note, I am doing a client installation as our server is Ingres 6.4/04 on a Unix installation).

I just solved the problem, and this might be good for people to know as it may save someone time.... In windows 95 I login as 'Jason Badry'. For some reason the name server is starting up as the user 'JasonBadry' - notice the missing space. I edited the II_SYSTEM/ingres/files/USERS file to remove the separating space and all was well. The documentation says that it only needs the USERS file for Windows NT, but apparently not.


Installing OpenIngres 1.2 and OpenROAD 3.5 in Win NT 3.51

Does anybody try to install OpenROAD 3.5 and OpenIngres 1.2 for Windows NT 3.5.1 under the same directory? Please help me!

I managed to startup OpenIngres 1.2 if no OpenROAD 3.5 had been installed.

  1. When I put in (install) OpenROAD 3.5 under the same directory, I got an error when I try to startup OpenIngres 1.2, the error seems like I didn't setup the II_SYSTEM, II_JOURNALING, II_DUMP, II_LOG_FILE correctly, which I already set up.
  2. When I try to startup OpenROAD, the system gives error to startup IIGCN and IIGCC which OpenROAD no need to startup because I was installed under the same machine and directory (host base).
  3. I have no problem to run both OpenIngres 1.2 and OpenROAD 3.5 if there are client/server configuration (diffrent machine).
  4. I managed to run OpenIngres 1.2 and OpenROAD 3.0 for WINNT 3.5.1 under the same machine (host-base).

My question is, is it a bug for OpenROAD 3.5 for WNT 3.5.1 or is it OpenROAD 3.5 only for client/server config.

First you must install OR3.5 into the \ingres directory. With OR3.5 you will be force to install the OR3.5 Drivers for INGRES. Proceed as required.

Secondly, after OR3.5 install then install the OI1.2 install in the same \ingres directory. This works without hitches....

Don't forget to define the %INCLUDE%, %LIB%, %II_SYSTEM% and %path% variables. Additionally, modify the \ingres\files\users file and include your self. Also modify the \ingres\files\config.dat and give your userid the required server privs.


Menu Fonts

In developing an OpenROAD application to be deployed across a variety of hardware platforms, we've found need to change all screen/menu fonts to Helvetica-8 to maximize portability ("system default" font resized on some platforms). Years ago in Windows4GL, a problem existed with changing the font on the pull-down options of the menubar. It appears that OpenROAD 3.0/04 (we're on SunOS 4.1.4) still has the same problem. We've succeeded in changing the font of the top-level menu-bar options, but the pull-downs themselves re-size at will and change fonts on the fly .. usually back to "system default". Documentation appears to have a run-time way to handle this by setting an EVN variable called II_W4GL_MENUFONT, but the App. Editors Guide doesn't give details on how to use it.

You can use any of the X fonts in your X11 fonts directory path.

To find the path to your font you can issue the command "xset -q" and look at the font paths listed. In one of you fonts directories there is a file called "fonts.dir". You can use any of the font identification strings listed here.

For example, to set the menu font to a 75dpi 24 point Heletica Bold font you would set the environment variable II_W4GL_MENUFONT to the string:

-adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1


Accessing Oracle and Ingres from the same OpenROAD app?

It'll cost you, but...

CA is developing (or has developed) a gateway (called an Enterprise Access product) from the Ingres Server to Oracle. When this is available, you can use Ingres/Star to access both the Ingres and the Oracle databases *or* you can use two DBSession objects, one with a thread to the Ingres database, the other to the Oracle Database through the gateway. Pretty slick, no?


How do I display Swedish characters correctly?

I have an Ingres table with varchar columns imported from a textual dump from a word document. Some of these characters are things like =D6344 ("a" with a umlaut) =D6345 ("a" with degree sign on top like in angstrom). Anyone have an idea how to tell OpenROAD to display these and other accented characters properly? I guess it is a fonts issue. I have tried all the fonts under the appearance menu on the frame editor with no joy.

Set,

II_CHARSETxx=3DISO88591

in your config.ing file.


How do I port an OR app from Ingres to Informix?

We intend to connect an CA OpenROAD application, developed under MS Windows 3.11, to an Informix database, running on an Dynix or SCO database server. The applications is now running with an Ingres database on an AIX server and we do not like to modify all the statements written for this architecture.

So, do you have any experience with ODBC drivers or gateways or something like this in this context?

We have recently completed porting a large OR/ESQL application from INGRES to Informix. We investigated many different approaches and decided that the best solution was to use the CA gateway to Informix. Like you we were reluctant to carry out large scale modifications to the application software and this method best satisfied that need. We had the additional requirement that the application still had to run against an INGRES database consequently we wanted to minimise the amaount of database specific code.

Our experience to date has been reasonably good; the main area of change was in converting the SQL from INGRES/SQL to INGRES/OpenSQL, in the 4GL this was relatively easy. The main problem area (suprise, suprise) was in the handling of the different date formats.

In general I would say that (for us certainly) converting an application from Ingres to Ingres/Informix was pretty painless.


Is it possible to use a network directory and place all of your .IMG files?

It certainly can be done. We connected a network-drive (on a Unix-machine) through PC-NFS-PRO. This way we could assign a drive-letter to the network-drive. In our case the network-drive is K: . On this drive K: we created a sub-directory 'Images'. We copied all our images in that directory.

From now on, every pc that logs in and sets II_W4GLAPPS_DIR=K:\images in his config.ing can access the images. It is an enormous advantage in the maintenance of the images (we only have to update the images once on the network-drive).


How do I get cut/copy/paste for entry fields?

You can use Shift+Delete, Ctrl+Insert, Shift+Insert for Cut, Copy, Paste on entyfields with no additional programming.

It is also possible to set and get other data via the clipboard using the appropriate Windows API calls (but too many steps for me to recall at the moment).

I understand that there are (but have never used) clipboard functions within the interop sample (II_SYSTEM\ingres\w4glsamp\interop).


Can I use gateways to talk to Ingres and Oracle from the same app?

Has anybody have any experience using CA's Enterprise Access technology for simultaneous transparent read and write access to data stored in INGRES and ORACLE ?

More specifically, if I have database A on machine A in ORACLE and database B on machine B in INGRES (6.4 or OpenIngres 1.2), can I write application on machine B which can access data from machine A and B simultaneously ?

The Ingres answer is to set up a star database in Ingres that talks through a gateway to Oracle, I think the Oracle answer is to use their distributed database to access Ingres through their gateway. If you need to update both, I think I trust Ingres 2 phase commit more that an Oracle 2PC. That's based on anecdotal evidence rather than experience - and maybe Oracle 8 will be the answer to all our prayers. <hollow laughter>


HTMLised by Don Simonetta