p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Web Site: DB2-connect


Message #1 by "Patrick Ickes" <romten9@h...> on Mon, 10 Dec 2001 17:33:16 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C181CC.1D74C36C
Content-Type: text/plain

Dates in DBs are generally a problem, particularly if you are in a place
that uses international dates. There is a page on Ken Schaefer's site that
deals with dates in access which is still relatively applicable to other
databases.
http://www.adopenstatic.com/faq/DateswithAccess.asp

I don't know how DB2 stores dates so this might be incorrect.

As a general rule the best option is to insert dates in the format that best
suits the database. For SQL Server and Access this is yyyy/mm/dd eg
2001/12/11. When you retrieve dates you want to convert them to a format
that you want to use to display them in. SQL Server has a function CONVERT
which does this for you, I don't know if DB2 has an equivalent. CONVERT did
not offer all the options I wanted so I wrote my own which is run on every
date I want to return (function stored in an include file).

Hope this helps to some extent.

regards
David Cameron
nOw.b2b
dcameron@i...

>  -----Original Message-----
> From: 	Patrick Ickes [mailto:romten9@h...] 
> Sent:	Tuesday, 11 December 2001 8:33 AM
> To:	Code Clinic
> Cc:	romten9@h...
> Subject:	[proasp_codeclinic] Web Site: DB2-connect
> 
> I know that posting the same question to multiple forums is frowned upon
but I don't have much choice.   I posted this question over a week ago to
proasp_howto and have received no answers.
> 
> I'm working on a website (ASP, IIS5.0) that is connected to an IBM
mainframe database(DB2) via DB2-connect.    This site is in its infancy, but
functional so far.    Our database connection is working fine, but we have
run into a few minor issues.    DB2 dates are reformatted upon return, for
example.    
>  
> Has anyone else experience with DB2-connect ?    Any issues,  concerns, or
problem areas ?   Any tips from the pro's ??
>  
> Thanks very much.    
> 
>  
> Patrick Ickes
> Web Developer
> MaximGroup
> romten9@h... <mailto:romten9@h...>
> 
> 
> 
>   _____  
> 
> Get your FREE download of MSN Explorer at http://explorer.msn.com
<http://go.msn.com/bql/hmtag_itl_EN.asp>
$subst('Email.Unsub'). 


  Return to Index