Oracle NLS function/settings file location - oracle

I am working on a Oracle Jdeveloper project that was made by another person which I can no longer contact. On the code he uses this: nls['NO_ROWS_FOUND'].
I have made some searches and I found that this goes to file that stores oracle environment variables for language translations and loads the corresponding value for that key variable. (Not sure if this is true).
What I would like to know is how can I find this file, or where are these values stored? Can I had diferent translations?
He is using this to enter text on a Label.
Thanks
Best Regards

Related

Microsoft Access 2013 VBA code changes bound control on change of record am getting write conflict

Have just got back into coding in Microsoft Access, so it might be something stupid.
Situation:
Sqlite database linked to Access db via ODBC.
Have created a form which has bound controls from a table.
Due to the way sqlite stores dates, as text, I am not able to use the calendar picker. I thought easy I can create an unbound text box control, set the format to date and then I will have a date picker. Then in VBA just get it to change the value of the bound date control, which would be hidden.
Me.txt_Date_of_birth.Value = Format(Me.Txtdate_of_birth_with_calandar_control.Text, global_date_format)
It works it changes the value of the bound control (which for testing is not hidden).
But when I change records I am getting an error of
Write conflict. This record has been changed by another user since you
started editing it. If you save the record, you will overwrite the
changes the other user made.
From my testing it is being caused by this unbound control updating the bound control. Anyone know a simple fix?
And I would prefer not to get my data from a query that formats the text field into a date field.
And I can confirm that the error does not occur when I create an access table and try to update a bound control.
Try saving the record at once:
Me.txt_Date_of_birth.Value = Format(Me.Txtdate_of_birth_with_calandar_control.Text, global_date_format)
Me.Dirty = False
Does this table have a primary key? - in the eyes of Access - by which I mean when you look at the table in design view with Access.....
If not try adding that.

turbogears querying the database for file

I am using the Turbogears-2.3 framework and now I know how to upload the files in the database using the tgext.datahelpers. I understand that the file gets uploaded in the disk and in the database the metadata gets stored in the JSON format. Now I want to query the database and wanted that the link to get generated in the file collumn so if someone clicks on it then the file can get downloaded. However when I tried to query the database and viewed the table, in the file column I get text like trai.model.model.F_AttachedFile object at 0xa7325bac (trai is the name of the project).
When I iterated through the table and printed the value of the element in the javascript console, the same thing is getting printed. Could anyone please tell me how to generate the downloadable link from this.
Thank you very much
Not sure that I full understood your question, a little snippet of code might have helped understanding the context, but if I guessed correctly you are trying to the the url of a tgext.datahelpers uploaded file.
In such case see https://bitbucket.org/axant/tgext.datahelpers#rst-header-attachments each attachment Column provides an url property, so you can get the URL from there.
There is also an example that saves and Document model with a file field and queries it back printing the url.

Saving copy of old table entry to another table when updating table entry with SaveChanges()?

Im working on an online store project where I have already made it possible for an administrator to update different table entries via the store gui (like items, user profiles, orders etc). SaveChanges(); is used to save the changes.
Im currently trying to figure out how to make this work:
An entry in table "items" gets updated.
Before the entry in the table "items" gets updated, a copy of the old entry gets saved into a table named "history-items".
The copy that is saved to "history-items" preferably has a timestamp.
How would I go about doing this? (As you might tell, I just recently picked up visual studio, and am pretty new to everything)
Thank you.
There are atleast 3 ways to do this:
If you are using SQL Server 2008 or newer this is now built in functionality, see: http://msdn.microsoft.com/en-us/library/bb933994.aspx
If you opt not to use that then the simplest solution is to use database triggers.
If you want to do it in C# code, then you need to read the original values before saving, and save these original values to the history table. For reading original values see: How to get original values of an entity in Entity Framework?
I would go for option 1 if possible.

for what purpose # (hash) sign is used in Joomla?

In joomla MVC i came around this SQL query. I was unable to understand the purpose of #sign ??
INSERT INTO `#__helloworld` (`greeting`) VALUES
('Hello World!'),
('Good bye World!');
It is replaced by the prefix for that installation when it is run. This way you can have multiple Joomla installations running in the same database, as long as they all have different prefixes. You can find the prefix for your installation in the Global Settings as well as in the configuration.php file.
The entire #__ part is necessary for the replace to work properly. So just a # will not work as intended.
*Note that this is a Joomla specific construct, so don't expect this to work with just PHP/MySQL. It will work for all Joomla versions and is highly recommended.
As you know there is a random 4 or 5 character lentgh table prefix for joomla database tables. This is made for increasing security. Joomla is an opensource content management system, so malicious attackers know what tables exist. You cannot change the table names (or this would takes too long), so adding a prefix for the table names is a nice solution.
#__ part of the table name is replaced with table prefix which has been defined while installing joomla when the code is processed. Also you can see the table prefix in configuration.php or from the administrator panel
Follow Global Configuration -> Server -> Database order.
#__ replace with tables prefix (defines in configuration) before execute query
Joomla and MySQL

Magento - Store Config only added to database after being saved

I have noticed that in Magento the core_config_data table is very small just after installation and it gradually gets populated over time ONLY when sections of the system config are saved. For example there are no values in the core_config_data table for the contacts settings - yet i can still do Mage::getStoreConfig('contacts/contacts/enabled') and get the correct value.
So, does this mean that magento is simply reading the config xml until a value is saved, and at which point it saves to the database and then the value is read from there?
If this is the case, then surely this is a bad design pattern, having these values stored in two places?
I think this post may help.
The Magento Config: Loading System Variables

Resources