Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Green Bay, WI
    Posts
    2

    Unanswered: Informix Date input not working in asp.net

    I'm working in asp.net trying to insert a record into a Informix 5 table.

    Additionally I'm using the Microsoft.Data.ODBC namespace.

    Here's the sql that is failing:

    INSERT INTO dsTrans_test (clock, jobname, subjob, txaid, txcid, txmach, txdept, txnote, txdate, txhours, txcode, txsource, txtype) VALUES (2320, 'CPO8367', 0, 4500, 4500, '0', 44, 1, '04-2-20', 0, 'NORM', 'M', 'L');

    I've tried many variants of the txdate including 4 digit year. The following Exp(error) is occuring.

    generic_inf5, ERROR [42000] [OpenLink][ODBC][Informix Server] (-201) ERROR [42000] [OpenLink][ODBC][Driver]Syntax error or access

    When I exclude the date, the record is written to the table.

    Any help is greatly appreciated!

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    15
    I was having some similar problems an the solution was match the regional setting of the Machine with the type of date expect.
    MM-DD-YYYY or DD-MM-YYYY or changing "-" For "/", y another case I need to add the time too.
    Did you test the sentence with dbaccess ?

  3. #3
    Join Date
    Feb 2004
    Location
    Green Bay, WI
    Posts
    2
    Thanks for the reply. I did check the regional setting and it's setup as yyyy-mm-dd. I have a asp that inserts records w/ dates using this same syntax and that works fine.

    I have tried almost every variation date syntax for writing the record to no avail. For now, I'm going to pass the parms to a asp to do the record insert and update. This will allow me to proceed w/ the project and work on the problem later.

    Are we having fun yet?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •