Using a field to subtract or add to a number field in the database
Hi everyone I use Jdeveloper 1.5 with ADF and have the following functionality
I have 3 fields
Account withdrawing from:
Account depositing to:
Sum:
In the database I have 2 tables clients and accounts. Client table has client name, adress phone, account number which is a foreign key in a one to many relationship with accounts. Accounts table has account number and account balance which is a number and represents the amount of money u have in your account. Each client has one or more accounts and can put money in other people's accounts or transfer between his own accounts (if he has more than one) So what I want is for the fields above to withdraw the sum from the account and deposit into another account or throw an error "Not enough funds" if the account withdrawing from has less money in it than is written in the field.
Unfortunately I have no idea how to do this and was hoping u guys could help.
2. Use a ValueChange listener on the input text field and query the account balance before processing the deposit
How do I do this? When you say query you mean sql query right? The thing is I'm not sure if I will be allowed to use Jdeveloper for this or will have to use Dreamweaver so would love to use as much SQL as possible.
Similar Messages
-
Add Prodcution order number field on the Create/ maintain inspection lot
Hello,
Can some one please guide me how to add production order number field on the QA01/02/ and 03 transaction codes?
Thank you!
KhanWhat are you trying to do exactly?
The production order number only becomes available in QA01 when you select 04 as the inspection type you are creating. You can't populate this field using any other inspection types.
When using QA02 or QA03 you can use the drop down match codes to search for an inspection and I beleive you can use the production order number in one of the match code screens to select a lot.
Craig -
am using iPhoto 11 mail and cannot add more than one recipient in the 'to' line. When I put a comma in, the recipient's address is deleted. If I use '< >' with more than one recipient the save grays out. Any thoughts?
I figured it out. I needed to fix some errors in my account information. It works fine now.
-
We can't add a decimal number column with the create table forms
In the version 4, we can't add a decimal number column with the create table forms.
In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer. -
Error Message (ORA-01722: invalid number) when add amount into Number field
I am using VB.net, trying to insert data into a field called amt with Data Type 'Number'.
my vb.net code is as follows
Dim oradb As String = DatabaseConnectionString
Dim AmountValue As Decimal = 123.45
'get the connection
Dim conn As New OracleConnection(oradb)
'open the database connection
conn.Open()
'create oracle command
Dim cmd As New OracleCommand("INSERT INTO TBL1 (AMT) VALUES (:AMT)", conn)
cmd.CommandType = CommandType.Text
cmd.Parameters.Add(":AMT", OracleDbType.Decimal, AmountValue, ParameterDirection.Input)
'Execute
cmd.ExecuteNonQuery()
I got error message "ORA-01722: invalid number". Please helpDid you also change the below line before inserting Integer 123:
cmd.Parameters.Add(":AMT", OracleDbType.Decimal, AmountValue, ParameterDirection.Input)
to
cmd.Parameters.Add(":AMT", OracleDbType.Integer, AmountValue, ParameterDirection.Input) -
Add inventory bin number field to Work Order Components Tab
Hello,
Can someone please show me how to add the inventory bin number field to Work Order Components tab.
ThanksHi Jay,
Can u help me in understanding as how you achieved this functionality?
Regards. -
I know this it "nit-picky", but to me it is frustrating. Is there a way to lock my chosen font and keep it from changing when a link from the internet is added to the email? Thanks.
I at first thought it might be a Mac thing, but I couldn't find a solution. I realized that the date only affected my email, so then I thought it must be a Mozilla problem.
-
What is the best way to create fields at runtime in the database using JPA?
We use Oracle ADF platform to build web applications and extend to webcenter portal application.
The current expectation from Java developers team is to change our development approach/method, so that adding some fields in the application should not required any development effort. In other words, when you want to add a data field (at least no relation to any field) in some form, it should be enough to save some metadata of the field to the database along with execution of related job/commands in the application. Additionally, we need to render the view dynamically according to added fields.
Essentially, I think that such an expectation is not suited for the Java world, but if it could be possible or if someone has prior experience to do this, I would want to use it. We don't want to be interact directly with the database using native SQL through JDBC, as that would mean going out of the ADF framework.
Suppose that, we define the metadatas of custom field(s), for example its type(string, number, combobox etc)length, isunique, mandatory... And then we run the execute command of this field definition to create on database and map to related entity object from now on. I assume that might be possible to add entity class as property belonged to class. Anymore when rendering the page, new custom field must be shown in form view if even there is no deployment process...
There is Extensible Entity in EclipseLink. Has anybody got sample project about used eclipselink extensible entities? I could not find enough detailed docs unfortunatelly
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Extensible_Entities#EclipseLink.2FUserGuide.2FJPA.2FAdvanced_JPA_Development.2FExternal_Mappings
http://wiki.eclipse.org/EclipseLink/Examples/JPA/Dynamic#Usage_Examples
http://flex.winfxpro.info/download/?noderef=workspace://SpacesStore/af69ebfb-6d9f-4a03-8244-c56100d16debIn the persistence.xml specify the property
<property name="eclipselink.ddl-generation" value="create-tables"/>
But, a JPA implementation is not required to create tables according to the EJB 3 JPA specification. The Hibernate persistence provider does, the EclipseLink doesn't.
<provider>org.hibernate.ejb.HibernatePeristence</provider> -
I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
the length of the string is prepended to the string itself as a big-endian four-byte integer.
I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
Am I missing something here?David,
You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
I am attaching three files that you can use to demonstrate the problem. The VI file c
ontains an explanation of the problem and instructions for installing and operating the demonstration.
Ron Martin
Attachments:
TestLongBinaryFields.vi 132 KB
Sample.UDL 1 KB
Sample.mdb 120 KB -
Hello, I'm using JDev11.1.1.2
My requirement is all number fields in the application to be right aligned. Is there a general way to achieve this ?
Thank youHi John,
You can try adding some css yourself:
Add a class to your form field in the fields HTML Form Element CSS Classes attribute, and add a text-allign property for that class in your css file or in your region html header.
For example put 'rightAlignField' in the HTML Form Element CSS Classes attribute and add
<style>
.rightAlignField{ text-align : right; }
</style>
to the form regions html header.
Regards,
Vincent -
Filter Accounts With Required Personnel Number Field
Hello, SAP experts.
I have a task to make a report which will list all the G/L accounts which have required Personnel Number field.
I know one way to do this:
First of all, I run SE16N , enter table name T004F, and then I can see all the field status groups.
My company has a field status variant with 3 field status groups which have mandatory Personnel Number field - Z040, Z073 and Z074
I can see that all the three groups have the + sign at the 18th place in the Field Selection field. This marks the Personnel Number field.
Then I go back to the beginning of SE16N, choose the table SKB1, enter those three groups in the Field Status Group multiple selection screen, and hit the Execute button. Now I have the list of the accounts that I was looking for.
I was wondering if there is simpler way to do this. It would be perfect if I could make a custom report (using SQVI for example) with the algorithm which will do something like this:
FOR ALL G/L ACCOUNTS
GET THE ACCOUNT'S FIELD STATUS GROUP
IF FIELD_SELECTION[18]=='+' THEN
ADD THE ACCOUNT TO THE LIST;
END IF;
END FOR;
Thank you very much for any help you can provideThanks for your answer, Vikas.
Of course, I don't insist on using SQVI. I could as well make a custom report using SQ01..03, but I'm not sure how to check if a particular field_selection character is equal to '+'. To be more precise, I would like to know how to translate the pseudo-instruction...
IF FIELD_SELECTION[18]=='+' THEN
ADD THE ACCOUNT TO THE LIST;
END IF;
...into "real" ABAP instructions.
If you or anybody else can help me with that ABAP part, I'd be grateful -
Add more than one entry into a database from single form
I have a page that has 1 form that allows you to add 1 job.
I want to be able to have a button or something that says add
job and add another job.
When creating the database I did not create a table to hold
the order just add the job.
I am attempting to create a new version of the site with
order referencing job_id and customer_id so that a job can belong
to an order. And I can an order that has many jobs.
What is the best way I can do this and then I will need it to
be displayed on the invoice.
I also need to beable to create an invoice for the particular
job.
but that does not need to be done here.I have posted previously, but the requirement from my friend
has changed somewhat.
I have a add job page (add.php) and I need to add a
button/link to add more fields of the same to add a job to the
chosen customer. -
I have developed a web site for a real estate agency for which I have built a custom web app. The web app has a number fields that display information about individual properties in both list and detail formats. Some of the fields I created in the web app are "number" fields. I used number fields for price and square feet because I also have a search form linked to the web app. I needed to have a min and max search capability for these two fields, which the "number" field provides automatically. However, being a "number" field, it does not allow for the use of commas in the field, which is a client requirement. If a comma is used in the web app field, the display is null. For example, the client needs the price to be displayed like this (1,300,000) vs (1300000). Here is a link to the test site: Anne Rogers Realty Group, Inc - Featured Listings. Note the price and square feet fields on both the list an detail views for the properties. Is there any way around this problem? Thanks in advance
Well you can do anything from developer's perspective but asking client to put same value twice can make you look unprofessional.
Here's what I did for many house listing websites.
1. Client puts price in pure number format ( e.g. 500000 )
2. wrap the price value with a tag in List/Detail template e.g. <span class="house-price">{tag_price}</span>
3. then at the end of the page put a jQuery snippet which would globally format the prices ( e.g. $('.house-price').formatCurrency(); )
Here's one I use
https://code.google.com/p/jquery-formatcurrency/
even if you're not familiar with jQuery it's pretty easy to follow
No more complain from client -
Unable to connect to the database instance using Enterprise Manager.
I just install Oracle 10gr2 in my computer and after successful installation created a database instance which also install successfully. I then configure the listener using Net Manager and then start the database instance, the listener and dbconsole, everything seems to work fine and checking the status of this services from the command prompt indicates everything started successfully. But when I try to use Enterprise Manager I was directed to the Database Down Page with a message unable to connect to database instance. I try to use startup and perform recovery but every time I log-in to the database an error message comes out:
SQLEXCEPTION
ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified.
It seems for Enterprise Manager to connect to the database it needs to access this NLS(National Language Support) data files or specify an environment variable to point to this data files. I am just new to Oracle and I am having difficulty solving this particular problem. Where is this data files located and how do I configure Enterprise Manager to access this NLS data Files?
Any help however small will be highly appreciated.Are you able to connect to the database via SQLPlus?
What Operating System are you using?
Assuming Windows, can you RUN regedit to open Windows Registry and check the value or NLS_LANG when you select
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_<your_oracle_home>
Examples of vaules you may find:
1. ENGLISH_UNITED KINGDOM.WE8MSWIN1252
2. AMERICAN_AMERICA.US7ASCII
3. AMERICAN_AMERICA.WE8MSWIN1252
4. FRENCH_FRANCE.WE8MSWIN1252
5. GERMAN_GERMANY.WE8MSWIN1252
If you are not able to connect to SQLPlus, from the command prompt try setting one of the above:
e.g.
D:\>set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
D:\>sqlplus /nolog
SQL>connect sysman/password -
how do I add a yahoo search field to my toolbar so I can always see it? It used to be there until a month ago and now is gone.
If you either updated to Mountain Lion or updated to Safari 6 under Lion then there is a unified URL address bar with the search. I personally don't like it either.
Maybe you are looking for
-
Acrobat XI Standard Doesn't Have a Compare Button on Navigation Panel
We have a few machines running Acrobat XI Standard. Neither of those users can do the side-by-side view of a previously compared document (accessed via the compare button on the navigation panel) like other users who are using Acrobat 9 Standard, X S
-
Hello, we try to get access to a database like hsqlDB. If we want to use the Jdbc Adapter we get the folling error message: (com.sap.aii.af.ra.ms.api.DeliveryException: java.lang.Exception: database connection ) We configurated the channel prober and
-
My latest subscription doesn't work!!!
Hi There, I used up my first subscription and added another same subscription after that. But it looks like the new added subscription didn't work... Anyone can help me on this??? Orlando.
-
Hey all you Oracle experts, Hopefully simple question here surrounding Invoice printing and EDI. In our current setup we print most of our invoices on a daily basis, and the image generated through BI publisher gets archived successfully. We have rec
-
I still have the appearance of the gray screen after preforming all the solutions provided by apple support. What shall I do now?