From b1809a297076acdf1d5f56f7b81b6c1bbfaf7538 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 29 Jan 2009 18:02:43 +0000 Subject: Query failing because of field length applied to datetime field. Fixes #135. --- Source/TableSource.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/TableSource.m b/Source/TableSource.m index 51ef01cc..b9b1a3c1 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -580,7 +580,7 @@ returns YES if no row is beeing edited and nothing has to be written to db } } else { //CHANGE syntax - if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) { + if (([[theRow objectForKey:@"Length"] isEqualToString:@""]) || (![theRow objectForKey:@"Length"]) || ([[theRow objectForKey:@"Type"] isEqualToString:@"datetime"])) { queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@", selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"]]; -- cgit v1.2.3