Topic
2 replies Latest Post - ‏2012-11-05T20:49:40Z by SystemAdmin
Perumal.N
Perumal.N
4 Posts
ACCEPTED ANSWER

Pinned topic how to insert date field in table using sql adapter

‏2012-11-04T08:24:22Z |
hi,

in Invoke Procedure in inserting table row with date and other fields. for date field i tried '12/12/2007' and several format ('s000001','2012-12-11','2012-12-12','1','sick','0') but i cant get correct one it shows

{
"errors": [
"Runtime: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'From,To,Days_count,Reason,Status) values('s000001','2012-12-11','2012-12-12','1'' at line 1.\nPerformed query:\ninsert into apply_leave(Student_id,From,To,Days_count,Reason,Status) values(?,?,?,?,?,?)"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}

how to resolve this please help what format i need to give and need info for js
var invocationData = {
adapter : 'student',
procedure : 'applyleave',
parameters :
};

need this information also..
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: how to insert date field in table using sql adapter

    ‏2012-11-05T04:51:44Z  in response to Perumal.N
    Yeah im also facing this issue. Date is not getting inserted intotable
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: how to insert date field in table using sql adapter

      ‏2012-11-05T20:49:40Z  in response to SystemAdmin
      Hey,
      We need just a little bit more information to be able to help you out here. What type of data is your database schema specifying for that table? Is it a date object? Or is it a datetime object? Could you please post it?
      See the following link for more information.
      http://dev.mysql.com/doc/refman/5.1/en/datetime.html
      Thanks!
      -Dave