pankaj saxena

Ranch Hand
+ Follow
since Nov 21, 2009
pankaj likes ...
C++ Java
I have done B-LEVEL (Master in Computer Application) from NIELIT.
I am a Commerce Graduate.
NEW DELHI, INDIA
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pankaj saxena

Even if you declare variable : 'input' and 'type' at line 10 or after declaring variables : 'input' and 'type' at line 10, then also it is entering in an infinite do..while loop and its keep on asking : "Select the calculation you would like to perform" whether you enter 1 or 2 or  3 or 4 or 5. Therefore you need to consider your do.. while loop properly.
3 years ago
Sir\Madam,
I want to learn Oracle Application Framework, and i am new to Oracle so anybody would please tell me that how should I start to achieve this target.
I have only 6 months in my hand to learn this and I can't take any classes or coaching for this but i can use internet to surf good information about this.
This query is a job point of view, one of my friend told me that there is few vacancies in his company but they are demanding OAF.
And yes, please tell me the proper procedure about this like software required, ebooks, websites to surf.

thanks,
regards.
9 years ago
I have a query which is as follows:

I have 6 textfields & 1 submit button on one frame and I have implemented the validation checks on each textfield by writing all the coding using if else in the button, and when ever any one enters wrong data into any field , an error gets displayed using JOptionPane.showMessageDialog().

Now,my question is can i use try and catch over here . If yes, then should i need to write my own Exception class to handle such thing, or this idea is wrong?

thanks
regards.
9 years ago
Sir,

This is my code that exists in one of java files:
the problem is with the line : ps.setInt(1,sq_roll_no.NEXTVAL);

It is showing the problem with sq_roll_no, earlier I didn't use the commented line but to make sure whether it works fine, I added it.
If the above problem gets solved , I would like to add another column as 'Id' that will take the input as sq_roll_no.CURRVAL. If NEXTVAL works , CURRVAL will definitely work.
I would like to ask whether I should write this sequence creation code in Java file or in database.



thanks.
regards.
Sir Crish,

I am following your advise to use a trigger to auto increment the RollNo.

If I find any problem in this regard , i will definitely consult with you.

thanks.
regards.
pankaj.
sir,

I am following your advice to write that validation code in submit button coding.

thanks.
regards.
pankaj.
10 years ago
sir,

I have one frame in jave that takes different types of data entered by user and save it in oracle database.
Datas entered by user are: name, address, data, etc.

a Table in oracle named 'CandidateDetails' has following fields : RollNo,name, address, data,etc.

My question is:
i want to auto increment the rollno in database as and when any data is entered by user.
I know there is one option named : sequence in oracle that can solve this problem, but my problem is when i try to insert the data(rollno, name , address, etc ) from java program it displays error for sequence name.

for eg:
I have one sequence : sq_rollno
The sequence which i have created in oracle is:
CREATE SEQUENCE sq_rollno
START WITH 100001
INCREMENT BY 1
MINVALUE 100001
MAXVALUE 3000000
CACHE 5;

compiler generates error on this line in java program : INSERT INTO CandidateDetails VALUES(sq_rollno.NEXTVAL,'Rajes','Delhi');
compiler says: it can't resolve symbol sq_rollno.NEXTVAL.

Or , Is there any other option to solve this issue?

thanks.
regards.



My code is:

sir,

I have gone through the articles given in this forum relating to the similar error, my problem is when i tried to start the OracleXETNSListener, it starts for a second then it automatically stops.

I am not getting the real reason behind that.

regards.
pankaj.
sir,

earlier my program having a jdbc connection with oracle ,was working properly, data was going properly into the database.

But, now an error is displayed saying: java.io.SQLException : Io exception: the Network Adapter could not establish the connection.

what should i do in this case?

regards.
pankaj.
sir,

InputVerifier can't solve my problem.

thanks.
10 years ago
yes sir,

I do have one submit button for validating and sending the data to the database.

and , i am following the advice given by both of you. If I find any problem in this process I will definitely consult with you.

thanks.
pankaj.
10 years ago
that's why , i am so confused that which approach i must use. But, anyhow I am familier with getSource() method and i have used it for 6 or 7 textfields but this time the textfields are more in numbers . so I will use this but I'll keep searching another good technique for it.

thanks anyway.
pankaj.
10 years ago
Moreover, i would like to ask another question under the same thread or post.

Case: I have one textfield and i want to put following validation check on this textfield :

1. text should not be integer.
2. text field should not be left blank.
3. user must type only characters.
4. in case of entering 'email ids' , text must include @ between them.

Q: What approach should i use to implement all those validation checks?
Q: Does n't Exception can be used in this case , if yes, then how should i implement this approach into my program?

well i am also searching & experimenting on this issue.

thanks.
pankaj.
10 years ago
sir,

I have one form (a JPanel ) which has 35 textfields and other components.

My questions are:

Q. How should i write the eventhandling method for each textfield for implementing validation checks on the data entered by user?
Q. Whether should i write actionPerformed() with getSource() method , to check which textfield has been hit or is there any other technique so that my work becomes easier to write and manage?

thanks.
regards.
pankaj.
10 years ago