-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: createQuery with 2 ?
PostPosted: Wed Nov 23, 2005 11:42 am 
Beginner
Beginner

Joined: Thu Aug 11, 2005 11:16 am
Posts: 20
hi,

i need help to do an query like that :

Query q = HibernateUtil.getSession().createQuery("FROM AC_param param WHERE param.param_name = ? AND param.ac_id = ?");

q.setText(0, param_name , ac_id );

How i can replace first ? by param_name and the second ? by ac_id ?


Thks ,

_________________
Cyril,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 12:44 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
q.setInteger(1, ac_id)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 4:50 am 
Beginner
Beginner

Joined: Thu Aug 11, 2005 11:16 am
Posts: 20
Ah ok cool thks

_________________
Cyril,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.