Home » Developer & Programmer » JDeveloper, Java & XML » Oracle 9i, 9.2.0.1.0., RHEL 2.1 AS, jdk 1.3 (Is it the efficient use of Bind Variable?)
Oracle 9i, 9.2.0.1.0., RHEL 2.1 AS, jdk 1.3 [message #444010] Thu, 18 February 2010 06:09 Go to next message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Friends

here i'm posting the piece of my java code. Actually i want to know am i using the bind variable properly through java to connect oracle database. My application developer not able to give proper answer. please suggest me the improvement for below java code[in context of using bind variable].

public ResultSet fetchSalesOrderList(String CompCd,String ExecDate,String FactCd)
{		
String vSQL="";
	try
	{
	vSQL ="select salesorderno,preparationdate,stockistcd from sales_master where compcode=? and factorycode=? and exedate=?";

		PreparedStatement PrepStat = dbConn.prepareStatement(vSQL);
		PrepStat.setString(1, CompCd);
		PrepStat.setString(2, FactCd);
		PrepStat.setString(3, ExecDate);
		this.getConnection();
		return prepStat.executeQuery();
	}catch(Exception e){
	System.err.println("From clsDeliveryChallanB.fetchSalesOrderList :"+e);
	return null;
	}
}	

Regards

Jimit
Re: Oracle 9i, 9.2.0.1.0., RHEL 2.1 AS, jdk 1.3 [message #444015 is a reply to message #444010] Thu, 18 February 2010 06:16 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does mean "My application developer not able to give proper answer"?

Regards
Michel
Re: Oracle 9i, 9.2.0.1.0., RHEL 2.1 AS, jdk 1.3 [message #444017 is a reply to message #444010] Thu, 18 February 2010 06:20 Go to previous messageGo to next message
jimit_shaili
Messages: 231
Registered: June 2006
Location: India, Ahmedabad
Senior Member
Dear Michel

whenever we asked them about using bind variable in java code they just reply everything is okay.they just send us the above code for verification. i cross checked on asktom but i'm little bit confused about code, so i asked it here in this forum.

regards

jimit
Re: Oracle 9i, 9.2.0.1.0., RHEL 2.1 AS, jdk 1.3 [message #444031 is a reply to message #444017] Thu, 18 February 2010 07:07 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This does not answer my question.

Regards
Michel

[Updated on: Thu, 18 February 2010 07:07]

Report message to a moderator

Previous Topic: Passing nested table containing objects
Next Topic: user and metadata permissions
Goto Forum:
  


Current Time: Fri Dec 02 14:31:48 CST 2016

Total time taken to generate the page: 0.08440 seconds