prathimaprasun rao

Ranch Hand
+ Follow
since Jun 29, 2006
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by prathimaprasun rao

Hello ranchers,
I am new to struts.I have installed Eclipse on my machine. I would like to run sample Struts program.
Could anyone let me know where I can find complete information such as files/software needed/need to be downloaded to run basic Struts application?

Regards,
Prathima


15 years ago
Hello everyone,
Could any one fwd me the url where I can get Webservices and AJAX interview questions?

Thanks,
Prathima.
15 years ago
Hello everyone,
I have a form with fields sno, sname. I added a new field 'class' which is a list box with values 1 to 10.All the information related to sno, sname and class are stored in the student table.The class field has primary key.Now i want to drop the primary key which exists on this class field. So I executed "alter table student drop primary key(class);
It displayed an error message:ORA-01735:invalid alter table option. The reason why I want to drop this primary key is because when i try to open the legacy records on this form which do not have this new field does not allow me to save this form as this field has primary key constraint. If I can drop this constarint then I can update the student table with some default value in this class field for the legacy records as this field would be null for those records.Could any one let me know how to drop the primary key ?
Thanks,
Prathima
Hello everyone,
I have a form with three fields- sname, rank and date. The date field is still tokenized into day, month and year. The format of the date is mm/dd/yy.I have a text area where I can display all the values entered in the three fields.If my text area has values as follows:
aaa-1-01/27/08
bbb-2-01/28/08
ccc-3-01/28/07

I want the values to be sorted in the chronological order and the values should appear as follows in the text area:
ccc-3-01/28/07
aaa-1-01/27/08
bbb-2-01/28/08

Could any one tell me the way to display the values in the required order?

Thanks,
Prathima.
16 years ago
JSP
i have a textfield of size 2 characters. this field should only accept only alphabets but not numbers. we have isNumeric that will allow a textfield to have only numbers. do we have any function that will allow only alphabets

thanks,
prathima.
Hello everyone,
could any one forward me the url where I can find the basics of javascript?
I want to know how the fields on the particular form can be validated and in how many different ways the fields could be validated?

Thanks,
Prathima.
hello everyone,
I have a jsp that has the following fields on the form:
1. studentid
2.studentname
3.performance
4.class
5.teacher
5.principal.
All the above fields information is stored in "student" table.

Teacher assigns the value to performance field for each student.This field can have any one of the three values:
1. Poor
2.Improving
3.Good

This form allows the user to add/edit student information in add/edit mode.
During add mode, the student record is created. If there is change in that students information, the teacher edits that record data during edit mode.
The principal can edit student information.
Now my goal is to disable the studentid field when the student performance changes from either poor/improving to good for the first time.When that performance field has good as value in it, then that studentid field needs to be disabled and the teacher will not be able to change the value in that field even if the value in that field changes from good to poor/improving. Only the principal should have the ability to change the value in that performance field during edit mode.

For that I have created a flag_code field in student table.My idea is when the flag_code field has N value for the first time, we should lock that field from changing to Y when we change the value in the performance field.

int status1=0, status2 =0;
int flagcount=0;
String flag="";
String iStr1 = "",iStr2="";

-----------------

//Modified Code:-
strSQL=" select performance from "student" where upper(studentid)='"+studentid.toUpperCase()+"'";

//out.println(strSQL);
//out.println("hi");
//out.println("<br>");
Statement stmt12 = conn.createStatement();
ResultSet rs12 = stmt12.executeQuery(strSQL);
while (rs12.next()) {
status1 = rs12.getInt(1);


}
out.println("status code:"+status1);
out.println("<br>");
rs12.close();
stmt12.close();
//retrieving status value

iStr1 = String.valueOf (status1);

if(iStr1.equals("3"))
{
strSQL1 = "update student set flag_code ='N' where upper(studentid)='"+studentid.toUpperCase()+"'";
flagcount+=1;
flag=String.valueOf(flagcount);
}
else
{
strSQL1 = "update student set flag_code ='Y' where upper(studentid)='"+studentid.toUpperCase()+"'";
//flagcount+=0;
}

db.setSQL(strSQL1);
db.update();
out.println("flag_code for studentid = "+" " +" "+studentid + "is " + " " +strSQL1);
out.println("<br>");
//flagcount+=1;
//flag=String.valueOf(flagcount);
out.println("flag :"+flag);
out.println("<br>");

-----------------------------------------

<form>
<%


if (mode.equals("add")||(mode.equals("edit") ||(flag.equals("1")&& (userProfile.equalsIgnoreCase("principal") ) ) )){


%>
<input type="text" name="studentid" value="<%=studentid%>" SIZE="13" MAXLENGTH="13">
<%
} else {
%>
<input type="text" name="studentid" disabled value="<%=studentid%>" SIZE="13" MAXLENGTH="13">
<%
}

The problem with my code is that I am unable to capture when the value changed to 3(good) either from 1 to 3 or 2 to 3.My code disabled the studentid field when the performance field has value 1 or 2 during edit mode before it changes to 3 for the first time.
The goal is:
The studentid field should be active during add mode.
The field should also be active in edit mode as long as the performance field value changes from 1 to 2 and vice versa.Once the performance field changes from 1 or 2 to 3 for the first time, the studentid field should be blocked even though the value changes from 3 to either 1 or 2 during edit mode. Could anyone let me know how to solve this issue?

Thanks,
prathima.
16 years ago
JSP
Hello everyone,

I have a table "Student". This table has three fields- SNo, SName and SClass.

While creating this table, these three fields are set to have primary keys.

Now I want to split the field SName into SFirstName and SLastName.So I add two new fields - SFirstName and SLastName to the "Student" table.When I try to insert new values into the Student table, it displays the error message "Null value cannot be inserted into the SName" and fails to create a new record after adding two new fields.

I am assuming that SName has the primary key, so it does not allow to create a new record as this field cannot be null. Could anyone tell me how I can drop the primary key constraint on this SName field so that I can create a new record by inserting new values in all the fields - SNo,SFirstName,SLastName and SClass except the SName field without displaying the error message: "Null value cannot be inserted into the SName".

SName and Sclass are just an example fields.

I also need some advice for the data conversion process:

I thought of writing the update statement as follows:

update Student set SFirstName = 'A',SLastName='B' and SClass=1 where SName='AB' and SClass=1;

Could anyone tell me whether this is the correct procedure to do the data conversion.

If the SName has 17 values and Sclass has 2 values then do we need to write 17*2 =34 update statements for the data conversion process.

-Prathima
[ October 02, 2007: Message edited by: Bear Bibeault ]
All this is happening at the client side.
hello everyone,
I have three fields namely - sno, sname and class.

sno and sname are the text fields where as class is a list box with values from 1 to 10.

i have four buttons below these three fields.They are Add, Modify, Update and Remove.

there is a text area below these four buttons.

when i enter data into those three fields and click add, all the data will be displayed in the text area.when i select data from that text area and click modify the data will be populated from the textarea into the corresponding fields.when i click update, the data from those fields will be vanished and the fields will be empty.

now i need to write a validation so that these fields are not blank and display an alert whenever i click add or update buttons.

input type="button" value="Add" onClick
input type="button" value="Modify" onClick
input type="button" value="Update" onClick
input type="button" value="Remove" onClick

I think i need to write the logic for this validation below the value ="add" and value ="Update".
[ July 23, 2007: Message edited by: Bear Bibeault ]
Hello everyone,
I have crystal reports8. It will be converted to crystal reports XI. Now if we want develop an interaction between crystal reports XI and Java programs, is it required to develop an interface that will pass parameters from JSP to crystal reports in order to generate report.
Could any one forward me the crystal reports XI API documentation?
Could any one suggest me any book that will help me to develop/create me an Java interface that will provide interaction between JSP and cystal reports XI?

Waiting for reply!
16 years ago
Hello sir,
I have 6 different user accounts:administrator,datamanager,consultant,staff,strategic and authorized.
I want to enable the field "dhr_id" only for administrator and datamanager and disable for the remaining accounts.I have written the following code but could not enable the field for only those two accounts.
Could you just let me know what's wrong in the below code.

if (mode.equals("edit")) {
mode = "edit";
//archKey = userSession.getAC();
//out.println("ARCHKEY "+ archKey);
dhr_id = request.getParameter("dhr_id");
strSQL = "SELECT archaeology_pkey FROM archaeology WHERE dhr_id='" + dhr_id+"'";
if ((userProfile.equalsIgnoreCase("Data Managers")) || (userProfile.equalsIgnoreCase("Administrator")))
{
document.getElementById('dhr_id').disabled = false;
}
else
{
document.getElementById('dhr_id').disabled = true;
}
//out.println(strSQL);
Statement stmtSQL = conn.createStatement();
ResultSet rset = stmtSQL.executeQuery(strSQL);
while (rset.next()) {//begin while
archKey = rset.getString(1);
}//end while
rset.close();
stmtSQL.close();

Could any one provide the url where I can find the sample examples related to enabling and disabling particular fields?

Thanks,
Prathima
16 years ago
JSP
Hello Sir,
Thanks for your response.
It would be quite helpful if you could forward me some sample programs of this kind.

Thanks,
Prathima
16 years ago
JSP
hello sir,
I have two accounts namely user account and datamanager account. the user from user account will create some records and submit them to the datamanager account. when the datamanager logs into datamanager account,the datamanager should receive an alert stating that so and so user submitted these many records. please let me know how to do this.
Waiting for reply!
Prathima
16 years ago
JSP
Hello everyone,
How can we call a stored procedure from the jsp?
Thanks,
Prathima