I didn't know you were an hypnotist ;-)

Steve Ebersole wrote:

You want the user forum: http://forum.hibernate.org/

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

*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Srinivas Jadcharla
*Sent:* Friday, January 20, 2006 3:20 PM
*To:* hibernate-devel@lists.sourceforge.net
*Subject:* [Hibernate] bind variables Question

Hi there,

We are developing a hibernate(2.1.X) based application.We got a message from our DBA to **_use bind variables, not literals._**What exactly that means.Here is my code ..What exactly i should do to use bind variables?

  try {
   Session session = HibernateSessionFactory.currentSession();
   StringBuffer sql = new StringBuffer();
sql.append("from CswCaseParent1 as cp where (cp.clientSsnId = '").append(ssn)
     .append("' AND cp.clientPinId = '").append(pin)
     .append("') OR (cp.respondentSsnId = '").append(ssn)
     .append("' AND cp.respondentPinId ='").append(pin).append("')");
   Query q1 = session.createQuery (sql.toString());
   result = q1.list();

  }

Any help is much appreciated.
--
Thanks & Regards
Srinivas
732-648-9421(Cell)




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to