-
March 12th, 2010, 12:33 AM
#1
Help!
<%! String id,cgegis, itax, gpf_sub,hba_adv,hba_int,cpf_sub,pli,ic,it_scharge,afee,govt_cont,pm_relf,emp_tier_1;%>
<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbcdbcaydata1");
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select EMP_TITLE,EMP_F_NAME,EMP_M_NAME,EMP_L_NAME,EMP_PF_ACCNO, EMP_Eid from EW_T_EMP where EMP_ECODE="+uname+"");
if(rs.next())
{
title=rs.getString("EMP_TITLE");
fname=rs.getString("EMP_F_NAME");
mname=rs.getString("EMP_M_NAME");
lname=rs.getString("EMP_L_NAME");
bkpuname1=rs.getInt("EMP_Eid");
}
if(mname==null)
{
mname="";
}
if(lname==null)
{
lname="";
}
stmt.close();
// want to convert it into array to store the entire tuples of database file EW_T_PBR
Statement stmt3=con.createStatement();
ResultSet rs3=stmt3.executeQuery("select * from EW_T_PBR_"+yr1+" where (PBR_EID="+bkpuname1+" AND PBR_MONTH='3' AND PBR_YEAR='"+yr2+"') ");
//want to access the 12 months records instead of specifying the one month record individually...
if(rs3.next())
{
cgegis=rs3.getString("PBR_CGEGIS"); //These are the attributes of the table.....
itax=rs3.getString("PBR_ITAX");
gpf_sub=rs3.getString("PBR_GPF_SUB");
hba_adv=rs3.getString("PBR_HBA_ADV");
hba_int=rs3.getString("PBR_HBA_INT");
cpf_sub=rs3.getString("PBR_CPF_SUB");
pli=rs3.getString("PBR_PLI");
lic=rs3.getString("PBR_LIC");
it_scharge=rs3.getString("PBR_IT_SCHARGE");
afee=rs3.getString("PBR_AFEE");
edu_cess=rs3.getString("PBR_EDU_CESS");
pm_relf=rs3.getString("PBR_PM_RELF");
govt_cont=rs3.getString("PBR_GOVT_CONT");
emp_tier_1=rs3.getString("PBR_EMP_TIER_1");
}
else
{
cgegis="0";
ita="0";
gpf_sub="0";
hba_adv="0";
hba_int="0";
cpf_sub="0";
pli="0";
lic="0";
it_scharge="0";
afee="0";
edu_cess="0";
pm_relf="0";
govt_cont="0";
emp_tier_1="0";
}
stmt3.close();
}
-
March 12th, 2010, 02:36 AM
#2
Re: Help!
spam, posting same garbage two times does not make it any better.
Last edited by postmortem; March 12th, 2010 at 02:38 AM.
-
March 12th, 2010, 10:38 AM
#3
Re: Help!
Man, could you at least explain what the problem is.
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|