Announcement Announcement Module
Collapse
No announcement yet.
spring-jdbc SqlServer getdate help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-jdbc SqlServer getdate help

    Hi! i need some help...
    I want to execute a update, update a DATETIME registry with the GETDATE() sql server function, but i don't know how to do.
    I've this:
    Code:
    this.simpleJdbcTemplate.update("update [dbo].[PersonaNatural] set FCExpiracion = ? where IDPersona = ? ","getdate()" , personaRut.getIdPersona());
    I try with this too:
    Code:
    this.procGetDate = new SimpleJdbcCall(jdbcTemplate).withFunctionName("getdate");
    this.simpleJdbcTemplate.update("update [dbo].[PersonaNatural] set FCExpiracion = ? where IDPersona = ? ", procGetDate.execute(), personaRut.getIdPersona());

  • #2
    Why ?

    Code:
    this.simpleJdbcTemplate.update("update [dbo].[PersonaNatural] 
    set FCExpiracion = ? where IDPersona = ? ","getdate()" , personaRut.getIdPersona());
    Should be instead personaRut.getdate() ?

    The most important, post here the complete error stack trace

    Comment

    Working...
    X