Re: Informix Date format And ODBC
Posted in 2001
This is a multi-part message in MIME format. ------=_NextPart_000_0028_01C085F4.67DF3650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Use the setting of DBDATE environment variable to your date format. Doina ----- Original Message -----=20 From: Sebastian Streige=20 To: 'informix-list@iiug.org'=20 Sent: Tuesday, January 23, 2001 3:57 PM Subject: Informix Date format And ODBC Hi, everybody: I'm connecting to Informix 7.0 from a windows = application via ODBC. I know the date format is set throght setnet32 in = the DBDATE variable, but if i leave it unset.... Which is the dafault = date format? Where is it read from? We had an aplication working without setting = DBDATE with informix 5, and sending date constants in queries in = mm/dd/yyyy format, then we upgraded to Informix 7.0 and the aplication = stoped working. It recieved an error message from the server saying = "Invalid month date". So we tried changing the format to dd/mm/yyyy and = started working again. So we configured the client to know which = Informix version it was connecting to. Everithing went fine for two months, the apps = reading from configuration files the version number of the server, and = if 5 formating dates in queries to mm/dd/yyy, if 7 to dd/mm/yyy. Last night the server was restarted and today = morning we had users complaining about error messages saying "Invalid = Date Month" on aplications running against a Informix 7 Server. I = switched the flag to 5 to make the app format dates to mm/dd/yyy and the = app is working properly. =20 The big question is: Wich is the parameter that = tells the date format if it is not set by the client? Thanks in advance =20 =20 Sebasti=E1n Streiger Departamento Sistemas Red Megatone Argentina sstreige@redmegatone.com ------=_NextPart_000_0028_01C085F4.67DF3650 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Use the setting of DBDATE environment = variable to=20 your date format.</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Doina</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A href=3D"mailto:sstreige@redmegatone.com"=20 title=3Dsstreige@redmegatone.com>Sebastian Streige</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 href=3D"mailto:'informix-list@iiug.org'"=20 title=3Dinformix-list@iiug.org>'informix-list@iiug.org'</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, January 23, 2001 = 3:57=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Informix Date format = And=20 ODBC</DIV> <DIV><BR></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D080314313-23012001>Hi,=20 everybody:</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 I'm connecting to Informix 7.0 from a windows application via=20 ODBC.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 I know the date format is set throght setnet32 in the DBDATE variable, = but if=20 i leave it unset.... Which is the dafault date = format?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p;  = ;Where=20 is it read from?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 We had an aplication working without setting DBDATE with = informix=20 5, and sending date constants in queries in mm/dd/yyyy format, = then we=20 upgraded to Informix 7.0 and the aplication stoped working. It = recieved an=20 error message from the server saying "Invalid month date". So we tried = changing the format to dd/mm/yyyy and started working again. So we = configured=20 the client to know which Informix version it was connecting=20 to.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 Everithing went fine for two months, the apps reading from = configuration files=20 the version number of the server, and if 5 formating dates in queries = to=20 mm/dd/yyy, if 7 to dd/mm/yyy.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 Last night the server was restarted and today morning we had users = complaining=20 about error messages saying "Invalid Date Month" on aplications = running=20 against a Informix 7 Server. I switched the flag to 5 to make the app = format=20 dates to mm/dd/yyy and the app is working = properly.</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D080314313-23012001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 = class=3D080314313-23012001> &nbs= p; =20 The big question is: Wich is the parameter that tells the date = format if=20 it is not set by the client?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D080314313-23012001> Thanks = in=20 advance</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D080314313-23012001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D080314313-23012001></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D080314313-23012001></SPAN></FONT><FONT size=3D2>Sebasti=E1n=20@@NL