diff options
author | rowanbeentje <rowan@beent.je> | 2008-12-05 00:42:39 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2008-12-05 00:42:39 +0000 |
commit | 283e047e8ad265cc05f320d9eb08558cb7c51a97 (patch) | |
tree | 60d066602edd7d486f5c315a710112608777761f | |
parent | ed4f9e131caf2b3fcd4cfc0b270ab46b7272049f (diff) | |
download | sequelpro-283e047e8ad265cc05f320d9eb08558cb7c51a97.tar.gz sequelpro-283e047e8ad265cc05f320d9eb08558cb7c51a97.tar.bz2 sequelpro-283e047e8ad265cc05f320d9eb08558cb7c51a97.zip |
Fix for Issue #71 - correctly adds the hexadecimal specifier before hex strings, fixing the data corruption problems in all TEXT/BLOB types
-rw-r--r-- | TableContent.m | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/TableContent.m b/TableContent.m index 6610ceb1..60045a75 100644 --- a/TableContent.m +++ b/TableContent.m @@ -1083,10 +1083,7 @@ } else if ( [rowObject isKindOfClass:[NSNumber class]] ) { [rowValue setString:[rowObject stringValue]]; } else if ( [rowObject isKindOfClass:[NSData class]] ) { - //problem: if a blob field is edited, it becomes a string and is not more prepared as binary data - // but probably blob fields are corrupted before, when they decoded in the tableView method - // [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareBinaryData:rowObject]]]; - [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareBinaryData:rowObject]]]; + [rowValue setString:[NSString stringWithFormat:@"X'%@'", [mySQLConnection prepareBinaryData:rowObject]]]; } else { // [rowValue setString:[NSString stringWithFormat:@"\"%@\"", [mySQLConnection prepareString:[rowObject description]]]]; if ( [[rowObject description] isEqualToString:@"CURRENT_TIMESTAMP"] ) { |