-->
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: IDataParameters vs plain text queries
PostPosted: Wed Jul 13, 2005 11:35 am 
I was looking thru the NHibernate sources and i noticed you are using queries + IDataParameters instead of plain text queries. What are the advantages of using IDataParameters over plain queries ?


Thanks.


Top
  
 
 Post subject:
PostPosted: Thu Jul 14, 2005 11:37 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
It is mainly for security reasons...

Read:
SQL Injection Attacks and Some Tips on How to Prevent Them

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2005 8:04 pm 
Contributor
Contributor

Joined: Thu Jun 23, 2005 1:08 pm
Posts: 32
Location: Baltimore, MD
You also have the advantage of the ado.net provider escaping invalid characters and the like "like quotation marks in strings. Then on some databases (like MSSQL) you can get the advantages of preparing those statements and getting performance gains. It's always a good idea to use parameters whenever possible.


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.