If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix Date input not working in asp.net

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-04, 09:49
disdp1 disdp1 is offline
Registered User
 
Join Date: Feb 2004
Location: Green Bay, WI
Posts: 2
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!
Reply With Quote
  #2 (permalink)  
Old 02-20-04, 12:42
wzbn wzbn is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 14
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 ?
Reply With Quote
  #3 (permalink)  
Old 02-23-04, 08:48
disdp1 disdp1 is offline
Registered User
 
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On