How to get domain name from PL/SQL in Apex? - oracle

I have an apex application hosted at a certain address which not very user friendly. Let's say : aaze_a442.com
I have another domain (which is user friendly) that redirects to the aaze_a442.com let's say : niceexample.com such that APEX application will be transparently accessed from niceexample.com
The redirection works nicely.
I'm trying to get the nice domain name from PL/SQL. As a result I'm expecting to get : niceexample.com
I'm using the following query :
SELECT SYS_CONTEXT('USERENV','SERVER_HOST') FROM dual;
But it doesn't return niceexample.com, it returns instead aaze_a442
Does anyone know how to get the domain instead of the host name please ?
Thanks

Got the Answer :
OWA_UTIL.get_cgi_env ('REQUEST_PROTOCOL') || '://' || OWA_UTIL.get_cgi_env ('HTTP_HOST')
returns : https://niceexample.com

Related

routing in codeigniter - using company name on the end of the url instead of using the id

I have the following url:
http://www.mydomain.com/display/23
// 23 is the companyid, and i want there to be company name
I would like to display it like
http://www.mydomain.com/display/company-name-here
Is it possible to fetch the company name from my controller somehow? Is this possible in the Codeigniter? How can i get the company name from my controller in the routes.php file? I check the CI documentation but I found...nothing.
Regards, John
Open application/config/route.php and add following route path
$route['display/company-name-here'] = 'display/index/23';
Hope display is controller name and you will have to use there index function.
Or another possible way
$route['display/(:any)'] = 'display/index/$1';
Note your link should be http://www.mydomain.com/display/index/company-name-here-23
the link will be converted
http://www.mydomain.com/display/company-name-here-23

How to get the package name where error is triggered in Oracle Forms 6i

I'm giving support on some oracle forms 6i forms, and I'm getting a Numeric or value error. However, the process is very long and it navigates along many packages in the form. What I could do, is just put messages along the process (only visible to me, of course) to see where exactly it comes out, but this would be really long. So, I was wondering if there is anything I could use like DBMS_UTILITY.format_error_backtrace but on the client side, and get the package name where the error was generated. I currently use:
exception when others then functionThatPrintsMe(sqlerrm);
But this does not give me enough information.
DBMS_ERROR_TEXT returns the entire sequence of recursive errors
so you should get all the required information from that
Kindly use
exception when others then functionThatPrintsMe(DBMS_ERROR_TEXT);
for more information about oracle 6i forms you can refer
http://www.oracle.com/technetwork/documentation/6i-forms-084462.html
At form level ON-ERROR TRIGGER .Add these lines will solve your problem
--form level error display
message(ERROR_type||'-'||TO_CHAR(message_code)||': '||ERROR_text); message(' ');
--Database level error display
if DBMS_ERROR_TEXT is not null then
message(DBMS_ERROR_TEXT );message(' ');
end if ;

Doctrine record unknown exception in a Symfony 1.4 backend admin module

I am facing a problem with the admin generator and I am unable to get my way around this after 3 hours of brainstorming and exploring.
The error reads as:
500 | Internal Server Error | Doctrine_Record_UnknownPropertyException
Unknown record property / related component "option1" on "Questions"
Looking up the WWW, I got a gist of possible alternatives. None of which seem like the answer. option1, does exist under Questions schema. However, it is option_1 so I am not sure why it says option1. More importantly, opening up BaseQuestions.class.php file, it clearly states:
getOption1() retrieves the value of option_1.
Anybody with any answer on this?
Thanks,
I had just the same problem with a field named address_2. Changing the name of the field in the database to address2 solved the problem. I think that that this is because of the number that confuse the admin generator to translate the name from underscore-separated propriety name to camelCase function name. This issue append only with the admin generator so, if you need to use it you have to change the field name in your DB with option1.

netusergetinfo return 2221

netusergetinfo is returning 2221 error code for valid user . What is the reason? It is because of some security setting on active directory but I am not aware of it.
Probably you have the same problem as described here Get current user's last logon.
One possible reason is that you don't use UNICODE format for the user name.
Another problem is if you try to ask the name of domain user. In this case you should use not a form
nStatus = NetUserGetInfo (NULL, L"Domain\\TestUser", dwLevel, (LPBYTE *) & pBuf);
but use as the first parameter the name of a domain controller from a domain which has trust to domain "Domain". You can use DsGetDcName or NetGetAnyDCName or NetGetDCName to get this name.
To answer on your question exactly you should post the corresponding source code and describe shortly your domain environment and the role of the computer and the current user under which current process are running.
API: NetUserSetInfo / netusergetinfo
Error Code: 2221
Reason: The Username you are trying to update is not present in the system.
for reference:https://learn.microsoft.com/en-us/windows/win32/netmgmt/network-management-error-codes

Accessing URL parameters in Oracle Forms / OC4J

How do I access parameters passed into an Oracle Form via a URL.
Eg given the url:
http://example.com/forms90/f90servlet?config=cust&form='a_form'&p1=something&p2=else
This will launch the 'a_form' form, using the 'cust' configuration, but I can't work how (or even if it's possible) to access p1 (with value of 'something') p2 (with value of 'else')
Does anyone know how I can do this? (Or even if it is/isn't possible?
Thanks
Within Forms you can refer to the parameters p1 an p2 as follows:
:PARAMETER.p1
:PARAMETER.p2
e.g.
if :PARAMETER.p1 = 'something' then
do_something;
end if;
Thanks Tony
That was one part of the problem.
The other needed part I eventually found on oracle.com was the url structure. After all the forms90 parameters (config etc), you need to supply an "otherparams" parameter supplying your parameters as a parameter to that. (parameters seperated by '+': eg
http://server.com/forms90/f90servlet?config=test&otherparams=param1=something+param2=else
Thanks

Resources