Re: 4GL questions
Posted in 1993
->}gau@mendel.sing.ingr.com (Gau Lai Choon) asks: ->} ->} QUESTION 4 ->} ---------- ->} I'm using ANSI mode for my database. I have a problem that table cannot be ->} recognised by another user beside the dba although connect permission has ->} been grant. If my database is created by the user "mis" , then inorder ->} that user "beta" can recognise the table, I have to precede the tablename ->} with "mis". ->} How about my 4GL code ,especially the forms ??? This is my biggest ->} problem now... ->johnl@informix.com (Jonathan Leffler) answers: -> ->Don't use ANSI mode unless you absolutely have to. It's a royal pain in ->the posterior. Amongst the gotchas, a new one I found yesterday (well ->documented though, I4GL Ref Man Vol 2 p7-243) is that when compiled against ->a MODE ANSI database, I4GL defaults the WHENEVER ERROR condition to ->CONTINUE, not STOP! Uggh. -> ->If you do have to have a MODE ANSI database, then anytime any user runs any ->SELECT (or DELETE, INSERT, UPDATE, ...) statement, you must refer to any ->tables that the user does not own with "owner".table. Since your program ->will be used by more than one user (I assume), that means every table will ->have to be qualified by the owner name, everywhere. And as if that wasn't ->bad enough, you must get the owner name right. That means you have to be ->the ultimate in disciplined when it comes to building the database. Every ->table should be owned by the same, adminstrative, login -- your "mis" ->sounds about right. And your code will need to use "mis".table everywhere. ->Remember that when you upgrade to 5.00 or above, if you omit the quotes ->(mis.table), the engine (to be ANSI compliant) will case-convert the owner ->name to MIS. alan@den.mmc.com (Alan Popiel) then asks: How useful would it be to CREATE SYNONYMs for the tables, rather than changing the code to include the owner names for the tables? It seems to me that if only a few users must use the software, then some SQL effort could eliminate the need to change existing 4GL code, forms, etc. that work for the table owner. However, if *many* users must use the software, then this may be of limited use, since *each* user would need to establish his/her own set of synonyms. Checking the manuals, I do not see a CREATE PUBLIC SYNONYM capability, such as exists in Oracle. Regards, Alan ___________________________ ______________________| R. Alan Popiel |__________________________ \\ Internet: | Martin Marietta, Tech Ops | / \\ alan@den.mmc.com | P.O. Box 179, M/S 5422 | Std disclaimers apply. / )Voice: | Denver, CO 80201-0179 USA | ( / 303-977-9998 |___________________________| (But you knew that!) \\ /________________________) (____________________________\\