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.  [ 2 posts ] 
Author Message
 Post subject: DateTime and SQLSERVER
PostPosted: Fri Jul 20, 2007 3:38 am 
Newbie

Joined: Wed May 02, 2007 12:56 pm
Posts: 17
I´ve got the following query. this query works for SQL SERVER 2000 Spanish but not for English.


ses.CreateSQLQuery("delete from rol_usuariotecnico where idRol=" + rol.IdRol + " AND idUsuario='"+ rol.Usuario.Id + "' AND fechaIni= '" + rol.FechaIni + "' AND fechaFin='" + rol.FechaFin + "'", "borrarRoles", typeof(Incidencia)).List();


The problem is with the format of th dates. How can i solve it?


Borja


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 20, 2007 9:31 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
I suspect it is an character encoding issue (i.e. Spanish vs. English). I would first try using parameters instead of piecing the SQL together manually.

_________________
Karl Chu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.