|
|
Sponsor |
Date columns and ODBC: msg#00005db.mysql.odbc
My organization is currently migrating from MySql 4 to MySql 5.0.41. Our software uses the ODBC classes in MFC (CRecordset and CDatabase) to update certain information in our DB. Certain tables in our DB have columns of the DATE type. When we update these columns with ODBC (using the RFX_Date function), the actual query generated ends up looking like: UPDATE ... WHERE `DOB` = '19700505000000'; (I presume the WHERE clause is generated by the ODBC cursor library). In MySql 4 this would match rows where the DOB column was '1970-05-05.' However, in MySql 5.0.41, this doesn't match anything. I note that queries like: UPDATE person SET `dob` = '19650609000000'; work correctly in MySql 5.0.41; they don't even result in a warning. This is very strange to me; it seems odd that you can set a field with UPDATE or INSERT (without even a warning), yet a subsequent SELECT with the same clause will not return any results. Is this intentional behavior? I don't see any way to fix this in our code (short of changing all our DATE columns to DATETIME). However, it doesn't seem like an issue in MyODBC either. The ALLOW_INVALID_DATES mode doesn't seem to affect this behavior. We are using Windows XP SP2 and MyODBC 3.51.15. I would appreciate any help anyone can provide. Craig Holmquist -- MySQL ODBC Mailing List For list archives: http://lists.mysql.com/myodbc To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Temporary tables, Jean-Claude DAVID |
|---|---|
| Next by Date: | How to insert a binary data size of 4GB into a longblob column., crazyODBC |
| Previous by Thread: | Temporary tables, Jean-Claude DAVID |
| Next by Thread: | How to insert a binary data size of 4GB into a longblob column., crazyODBC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|