Conversion Error From String 0 Delphi
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of
Conversion Error From String Firebird Date
this site About Us Learn more about Stack Overflow the company Business Learn firebird date format more about hiring developers or posting 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.4k22854 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. –Sertac Akyuz Oct 29 '12 at 15:44 add a comment| 3 Answers 3 active oldest votes up vote 4 down vote accepted According to the Interbase 6.0 manual, Embedded SQL guide, chapter 7, Firebird supports conversion from YYYY-MM-DD and YYYY-MM-DD HH:MM:SS.qqq. I also believe it supports American style shorthand dates (eg 1
funcionarão. Por favor, habilite o javascript para ter acesso à todas as funcionalidades. Publicidade Últimos Tópicos Últimos Tópicos Resolvidos Tópicos melhor avaliados Tópicos Quentes Estatísticas do Fórum 0 Usuários ativos 0 membros, 0 visitantes, 0 membros anônimos Siga o iMasters Siga o iMasters no Twitter Siga o iMasters no Linkedin Siga o iMasters no Facebook Siga o Feed iMasters Siga o iMasters no Github [Resolvido]Erro Conversion Error From String "0" Criado por #Allan , Ago 16 2012 11:05 Por favor, faça o login para responder 6 respostas neste tópico #1 #Allan #Allan Members 11 posts Postado 16 agosto 2012 - 11:05 Bom dia, estou tentando fazer um relatório que filtra entre duas datas e esta dando o seguinte http://stackoverflow.com/questions/13071007/conversion-error-from-string-when-using-params-in-sql erro: conversion error from string "0" segue abaixo as linha de comando! MaskEdit1.Text:= DatetoStr(DateTimePicker1.Date); MaskEdit2.Text:= DatetoStr(DateTimePicker2.Date); formRelPagarData.qrPagar.Close; formRelPagarData.qrPagar.SQL.clear; formRelPagarData.qrPagar.SQL.add('SELECT * FROM PAGAR WHERE DATVC BETWEEN '+MaskEdit1.text+' AND '+MaskEdit2.text); formRelPagarData.qrPagar.Open; obrigado desde já Allan 0 Voltar para o topo Publicidade #2 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 11:47 1 Editado por FK., 29 agosto 2016 - 22:08 . 1 Voltar para o topo #3 #Allan #Allan Members 11 posts Postado 16 http://forum.imasters.com.br/topic/472658-resolvido%C2%A0erro-conversion-error-from-string-0/ agosto 2012 - 14:15 FK muito obrigado pela sua ajuda, deu certo usando o ParamByName. foi meu primeiro post no iMasters, me desculpe pelo meu erro! 1 Voltar para o topo #4 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 14:46 3 0 Voltar para o topo #5 #Allan #Allan Members 11 posts Postado 16 agosto 2012 - 16:39 Só mais uma dúvida, nessa linha de comando q eu postei estou filtrando somente entre datas, que seria o total das contas que o cliente tem q pagar nesse período. Eu preciso também fazer um relatório que filtre o Fornecedor e tambem as datas! É so eu colocar mais um AND adicionar FORNE? 0 Voltar para o topo #6 FK. FK. fodase Banned 627 posts Postado 16 agosto 2012 - 16:52 4 1 Voltar para o topo #7 #Allan #Allan Members 11 posts Postado 17 agosto 2012 - 09:00 Agora sim consegui terminar meus relatórios! Mais uma vez muito obrigado FK! Editado por #Allan, 17 agosto 2012 - 09:00 . 0 Voltar para o topo Voltar para Delphi ResponderCancelar Fórum iMasters → Programação → Delphi Publicidade Entrar Precisa de uma conta? Registre-se agora! Usuário Senha do Fórum Esqueci minha senha Lembrar dados Não recomendado para computadores públicos Entrar como anônimo Não me adicionar à lista de usuários online Privacy Policy
should I look for. select e.itemcode, e.sizeid, sum(d.monthqty*e.qty) from saleschmst m join saleschdet d on (d.compyrcode=m.compyrcode and d.invno=m.invno) left join extractassembly(d.itemcode, d.sizeid, 'N') e on (1=1) where m.compyrcode=4 and m.monthof=9 and http://www.delphigroups.info/2/8/294955.html e.itemcode is not null group by e.itemcode, e.sizeid Devinder Singh Delphi http://forums.devshed.com/firebird-sql-development/687395-overflow-occurred-data-type-conversion-conversion-error-string-post2434258.html Developer 2007-08-30 05:07:58 PM Re:conversion error from string "0" If I remove sum/group by it works. Svein Erling Tysvær Delphi Developer 2007-08-31 05:37:23 AM Re:conversion error from string "0" Devinder Singh writes: Quote A query where I am joining a procedure gives me the captioned error. what should I look for. select e.itemcode, conversion error e.sizeid, sum(d.monthqty*e.qty) from saleschmst m join saleschdet d on (d.compyrcode=m.compyrcode and d.invno=m.invno) left join extractassembly(d.itemcode, d.sizeid, 'N') e on (1=1) where m.compyrcode=4 and m.monthof=9 and e.itemcode is not null group by e.itemcode, e.sizeid Try adding 'and d.monthqty is not null and e.qty is not null' to your where clause (just to check that the conversion error isn't something like your component set not knowing how to handle NULL). conversion error from Set Devinder Singh Delphi Developer 2007-08-31 12:34:57 PM Re:conversion error from string "0" Still the same result. "Svein Erling Tysvær"
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