Firebird Conversion Error From String Blob
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might conversion error from string firebird have Meta Discuss the workings and policies of this site About
Conversion Error From String Sql
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting firebird sql conversion error from string ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up conversion error from string, when using params in SQL up vote 1 down vote favorite using Delphi 2010 (Firebird [testing], MS Sql Server, Oracle [production]) The following is my SQL SELECT p.script_no, MIN(p.start_Time) as startTime, MAX(p.end_Time) as endTime, SUM(p.duration) as TotalDuration FROM phase_times p WHERE (p.script_no=:scriptNo) AND (Trunc(p.start_time) >= :beginDateRange) AND (Trunc(p.start_time) <= :endDateRange) GROUP BY p.script_no ParamByName('beginDateRange').AsDate:= Date - 30; ParamByName('endDateRange').AsDate:= Date; I am getting a "conversion error from string - 10-25-2012" and i am not sure why, since my datetime fields are in the "10/25/2012 9:20:49 AM" format in the database. If i change it to the following : ParamByName('beginDateRange').AsString := formatDateTime('mm/dd/yyyy',Date - 30).....i get the error "conversion error from string - 10/25/2012" reserching this error has provided me no new avenues, do you have any ideas? delphi delphi-2010 firebird share|improve this question edited Oct 25 '12 at 14:46 ain 16.5k22954 asked Oct 25 '12 at 14:38 Blow ThemUp 3901925 3 What is the data type of the start_Time field? (VAR)CHAR or TIMESTAMP? –ain Oct 25 '12 at 14:45 both begin and end date fields are datetime –Blow ThemUp Oct 28 '12 at 23:25 @Jake - Firebird does not have a datetime data type. –Se
Show Posts Tag Search Advanced Search Go to Page... Thread Tools Display Modes #1 04-12-2007, 09:30 PM davidj Senior Member Join Date: Jan 2001 Posts: 2,900 Conversion error from string "BLOB" ? Using Firebird. I have a notes field which is created as a BLOB It stores text which is in a DBMemo When I try and perform an SQL Search on this field I get Conversion error from string "BLOB" What can I do? Thank you davidj View Public Profile Send a private message to davidj Visit davidj's homepage! Find all posts by davidj #2 04-12-2007, 09:42 PM davidj http://stackoverflow.com/questions/13071007/conversion-error-from-string-when-using-params-in-sql Senior Member Join Date: Jan 2001 Posts: 2,900 RE: Conversion error from string I think it is becasue I am using UPPER in the SQL? But I need to use UPPER? davidj View Public Profile Send a private message to davidj Visit davidj's homepage! Find all posts by davidj #3 04-13-2007, 03:31 AM daltamira Senior Member Join Date: Aug 2006 Location: Argentina Posts: 959 RE: Conversion error from http://www.delphipages.com/forum/showthread.php?t=181834 string could you post your SQL code? what is stored in the BLOB field? daltamira View Public Profile Send a private message to daltamira Visit daltamira's homepage! Find all posts by daltamira #4 04-13-2007, 03:34 AM davidj Senior Member Join Date: Jan 2001 Posts: 2,900 RE: Conversion error from string Just Text in the blob field. It works if I take out the UPPER(MyBlobField) = ... It seems you cannot use UPPER when searching a Text Blob Field in SQL davidj View Public Profile Send a private message to davidj Visit davidj's homepage! Find all posts by davidj #5 04-13-2007, 06:30 AM daltamira Senior Member Join Date: Aug 2006 Location: Argentina Posts: 959 RE: Conversion error from string From the help file: UPPER() can be used with a column, constant, host-language variable, expression, function, or UDF that evaluates to a character datatype. daltamira View Public Profile Send a private message to daltamira Visit daltamira's homepage! Find all posts by daltamira #6 04-13-2007, 06:36 AM davidj Senior Member Join Date: Jan 2001 Posts: 2,900 RE: Conversion error from string Others have had the same problem [link]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[/link] It keeps coming back to UPPER cannot be used in SQL with Blob? davidj View Public Profile Sen
note that maximum http://www.firebirdfaq.org/faq250/ length for VARCHAR is 32767 bytes (which might http://forums.devshed.com/firebird-sql-development/687395-overflow-occurred-data-type-conversion-conversion-error-string-post2434258.html be less characters in multi-byte character sets like UTF8). Various database access layers also have ability to retrieve BLOB data as string. For example, in PHP you could use: $row = conversion error ibase_fetch_assoc($qry, IBASE_TEXT); This automatically converts all textual BLOBs to VARCHARs, so you don't need to fetch blobs writing specific PHP code. Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, conversion error from each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page. If you are a commercial tool maker and your tool features a great way to handle the issue written about in this FAQ, please check out our advertisement page. All contents are copyright © 2007-2016 FirebirdFAQ.org unless otherwise stated in the text. Links Firebird News FlameRobin Home Inventory powered by FB Add content Advertise About The Firebird FAQ Categories NewbiesSQLInstallation and setupBackup and restorePerformanceSecurityConnectivity and APIHOWTOsErrors and error codesMiscellaneous
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 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) 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 f