SQL Server - nhibernate y sqlserver

 
Vista:

nhibernate y sqlserver

Publicado por borja (9 intervenciones) el 22/07/2007 20:43:46
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?
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:nhibernate y sqlserver

Publicado por Isaias (3308 intervenciones) el 23/07/2007 21:50:58
Borja

This it is a forum in Spanish, tries to use format ANSI, like this

YYYY-MM-DD

Regards
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:nhibernate y sqlserver

Publicado por borja (9 intervenciones) el 25/07/2007 08:43:33
El problema es no usar querys parametrizadas. COn eso se soluciona el problema
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar