Conversion Error From String Blob Firebird
Contents |
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full
Conversion Error From String Firebird
Time Job Ways to Get Help Expand Search Submit Close Search Login Join conversion error from string sql Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Delphi 7 Firebird query error: conversion from string "BLOB" Want to Advertise Here? Solved Delphi 7 Firebird query error: conversion from string "BLOB" Posted on 2007-08-13 Databases Delphi 2 Verified Solutions 9 Comments 2,278 Views Last Modified: 2013-12-09 Dear Experts, I have an Firebird query in Delphi 7 which gives me an error. The error message is: .... 'conversion error from string "BLOB" .... I have a field of BLOB (Text) type and to do a query on that field finding all matching (wildcards, lowercase) rows. Here is my query: " SELECT C.ContactID, E.EmailID, E.ContactID, E.FromEmail, E.ToEmail, E.Body, E.BodyPlainText, E.EmailDate, E.Subject, E.HasRead, E.HasAttachments, E.Blocked, E.Flagged, E.Deleted FROM tblContacts C LEFT OUTER JOIN tblEmails E ON E.ContactID = C.ContactID WHERE (UPPER(Body) LIKE UPPER('%keep%')) ORDER BY EmailDate DESC " Please advise. 0 Question by:Marius0188 Facebook Twitter LinkedIn Google LVL 19 Best Solution byLimbeck looks like upper doest go well with blob fields http://www.delphipages.com/threads/thread.cfm?ID=181834&G=181834 can you test without the 2 upper statements if that works? Go to Solution 9 Comments LVL 19 Overall: Level 19 Delphi 6 Databases 5 Message Accepted Solution by:Limbeck2007-08-13 looks like upper doest go well with blob fields http://www.delphipages.com/threads/thread.cfm?ID=181834&G=181834 can you test without the 2 upper statements if that works? 0 LVL 19 Overall: Level 19 Delphi 6 Databases 5 Message Expert Comment by:Limbeck2007-08-13 http://groups.google.com/group/dbase.programming/browse_thread/thread/68065b1b39545788/36160d984e64fc24?lnk=st&q=cannot+use+UPPER+in+SQL+Blob&rnum=2&hl=en#36160d984e64fc24 "Note: the UPPER function cannot be used with memo or BLOB columns. " 0 LVL 19 Overall: Level 19 Delphi 6 Databases 5 Message Expert Comment by:Limbeck2007-08-13 and to finish that: http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_blobs 0 Message Author Comment by:Marius01882007-08-13 Yes it does work without the upper. But how will I do a case insensitive query with blob field? Can you please advise me. Thanks. 0 LVL 19 Overall: Level 19 Delphi 6 Databases 5 Message Expert Comment by
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools Advanced Search Forum Databases Firebird SQL Development Overflow occurred during data type conversion. Conversion error from string "$$$###" Thread: Overflow occurred during data type conversion. Conversion error from string "$$$###" Share This Thread Tweet This + 1 this Post To Linkedin Subscribe to this Thread Subscribe to This Thread March 21st, 2010,10:51 PM #1 No Profile Picture belzedar View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Mar 2010 Posts 3 Rep Power 0 Overflow occurred during data type conversion. Conversion error from string "$$$###" The following queries result in the error - Overflow https://www.experts-exchange.com/questions/22759747/Delphi-7-Firebird-query-error-conversion-from-string-BLOB.html occurred during data type conversion. Conversion error from string "$$$###". when running this in EMS Manager Lite or inside a delphi/report builder application. Select tbl1.FIRSTNAME, tbl1.Image2, Sum(FieldA) as TotalFieldA from Table1 tbl1 inner join Table2 tbl2 on tbl1.REG = tbl2.REF Group By tbl1.FirstName, tbl1.IMAGE2 If the references to the IMAGE2 field is removed in the select and the group by then the query is fine. So is there some sort of issue where an Image (BLOB field) http://forums.devshed.com/firebird-sql-development/687395-overflow-occurred-data-type-conversion-conversion-error-string-post2434258.html cannot be selected in a SQL Statement with a summing function. The Standard Select * from Table1 shows the image field no problem. FYI - using Delphi 7 and Firebird 1.5.2 Faq Reply With Quote March 21st, 2010,11:35 PM #2 No Profile Picture clivew View Profile View Forum Posts Visit Homepage Contributing User Devshed Regular (2000 - 2499 posts) Join Date Jan 2006 Location Carlsbad, CA Posts 2,057 Rep Power 385 I don't see how you can do a GROUP BY on a BLOB field. I'm quite surprised that Firebird actually accepts the SQL. I have not double checked, so I could be wrong Clive Faq Reply With Quote March 22nd, 2010,12:04 AM #3 No Profile Picture belzedar View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Mar 2010 Posts 3 Rep Power 0 Originally Posted by clivew I don't see how you can do a GROUP BY on a BLOB field. I'm quite surprised that Firebird actually accepts the SQL. I have not double checked, so I could be wrong Clive Your most likely correct, which is why its failing, i guess i need to devise a different way to achieve what i need which is a group of total fields from a range of records in a
may cause this error. It seems it is caused when you try to open a TIBQuery or TIBDataset before all the forms are created. But I'm not sure. Team Delphi Developer Sat, 26 Jun 2004 23:12:44 GMT Re:conversion error from string "BLOB" QuoteGeorge Stephanov wrote: > conversion error from string "BLOB" http://www.delphigroups.info/2/06/337342.html > Is there someone that knows what may cause this error. It seems > it is caused when you try to open a TIBQuery or TIBDataset before > all the forms are created. But I'm not sure. This error is caused when you try to use a literal string for a Blob value. For example, the following line of SQL will cause this error: INSERT INTO MY_TABLE (ID, SOME_BLOB_COLUMN) VALUES (100, 'Foobar'); In order to pass a Blob value, conversion error you need to use a parameterized query: INSERT INTO MY_TABLE (ID, SOME_BLOB_COLUMN) VALUES (100, :BlobValue); HTH, -Craig -- Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH Delphi/InterBase WebLog: http://delphi.weblogs.com InterBase PLANalyzer (Free IB optimization tool): http://delphi.weblogs.com/IBPLANalyzer George Stefano Delphi Developer Sun, 27 Jun 2004 22:30:52 GMT Re:conversion error from string "BLOB" My case is different. I have the following query: conversion error from update users set ID='+IntToStr(i); where login='george' The table users has a field which is of type BLOB but this field is not used in this SQL statement. That's strange. I have this problem when I try to open TIBDataset or TIBQuery but only when this is done at the begginning of the program. In my case in the Create event of my datamodule. Team Delphi Developer Sun, 27 Jun 2004 23:35:46 GMT Re:conversion error from string "BLOB" QuoteGeorge Stefanov wrote: > My case is different. I have the following query: > update users > set ID='+IntToStr(i); > where login='george' > The table users has a field which is of type BLOB but this > field is not used in this SQL statement. That's strange. I have this problem > when I try to open TIBDataset or TIBQuery but only when this is done at the > begginning of the program. In my case in the Create event of my datamodule. Use TIBSQLMonitor to find out what is really causing the error. -Craig -- Craig Stuntz (TeamB) Vertex Systems Corp. Columbus, OH Delphi/InterBase WebLog: http://delphi.weblogs.com InterBase PLANalyzer (Free IB optimization tool): http://delphi.weblogs.com/IBPLANalyzer George Stefano Delphi Developer Mon, 28 Jun 2004 20:08:36 GMT Re:conversion error from string "BLOB" I tried to catch th