RE: [delphi-br] ajuda sql uso do or ?
WHERE (SEXO 'F') and (SEXO 'M') -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of alessandra porto Sent: 23 April 2010 02:24 To: firebird...@yahoogrupos.com.br; delphi-br@yahoogrupos.com.br; lista-del...@yahoogrupos.com.br Subject: [delphi-br] ajuda sql uso do or ? Peguei um banco velho de cadastros de clientes que possui uma serie de erros e preciso pesquisar todos os clientes que estão cadastrados com SEXO diferente do padrão F ou M Algo como: SELECT NOME,SEXO FROM CLIENTE WHERE SEXO 'F' or 'M' mas assim não funcionou como faço para mostrar os registros que sejam diferentes de F ou M no firebird Grata a todos que colaborarem *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib.
Ola senhor Voce perdeu um 'e' in fieldbynamwe dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname(codigo).asstring',[lopartialkey]); Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of dssmoura Sent: 19 December 2009 11:44 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib. Bom dia senhores. Tenho um formulario(localizar pacientes) de busca onde e chamado dentro de um outro formulario (pacientes)(estou usando bd access, adodataset para conexão no banco), no formulario de busca coloquei um edit, um sppedbutton e um dbgrid, coloquei no código do botão : procedure TFrmLocPaciente.Button1Click(Sender: TObject); begin Qlocpaciente.Close; QlocPaciente.Parameters.ParamValues['pac']:=edtconsulta.Text + '%'; QlocPaciente.Open; end; no evento onDbClick do dbgrid: procedure TFrmLocPaciente.DBGrid1DblClick(Sender: TObject); begin dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname(codigo).asstring',[lopartialkey]); end; quando da o duplo click esta dando o seguinte erro: Project Sistema.exe raised exception class EoleException with message 'Os argumentos são incorretos, estão fora do intervalo aceitável ou estão em conflitos'.Process stopped. Use Step or run to continue. Ai eu pergunto o que estou fazendo de errado, ou e outro codigo que tenho que usar? Desde já Agredeço a atenção de voces, obrigado e até mais -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib.
Eu tambem fiz um erro de digitacao. Eu queria dizer fieldbyname! -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Wilson, Stephen Sent: 21 December 2009 08:27 To: delphi-br@yahoogrupos.com.br Subject: RE: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib. Ola senhor Voce perdeu um 'e' in fieldbynamwe dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname(codigo).asstring',[lopartialkey]); Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of dssmoura Sent: 19 December 2009 11:44 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib. Bom dia senhores. Tenho um formulario(localizar pacientes) de busca onde e chamado dentro de um outro formulario (pacientes)(estou usando bd access, adodataset para conexão no banco), no formulario de busca coloquei um edit, um sppedbutton e um dbgrid, coloquei no código do botão : procedure TFrmLocPaciente.Button1Click(Sender: TObject); begin Qlocpaciente.Close; QlocPaciente.Parameters.ParamValues['pac']:=edtconsulta.Text + '%'; QlocPaciente.Open; end; no evento onDbClick do dbgrid: procedure TFrmLocPaciente.DBGrid1DblClick(Sender: TObject); begin dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname(codigo).asstring',[lopartialkey]); end; quando da o duplo click esta dando o seguinte erro: Project Sistema.exe raised exception class EoleException with message 'Os argumentos são incorretos, estão fora do intervalo aceitável ou estão em conflitos'.Process stopped. Use Step or run to continue. Ai eu pergunto o que estou fazendo de errado, ou e outro codigo que tenho que usar? Desde já Agredeço a atenção de voces, obrigado e até mais -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** *** -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Largura de colunas de DBGrid
Caros Rubem, Matheus e Leandro Obrigado pela ajuda. Lamento que eu nao explicou muito bem o meu problema e que o meu Portugues esta incorreto:: talvez em vez de utilizavel formula eu deveria ter escrito Funcao util para todas as instancias? Enfim, para explicar: Eu tenho uma consulta cuja dados sao exibidos em DBGrid1, e o texto SQL desta consulta eh deteminado por qualquer relatorio o usuario seleciona em uma lista, e assim o numero e o tamanho físico dos campos variam de acordo com a selecao que o usuario fez. Assim, a largura física das colunas deve ser determinada de novo cada vez que a consulta eh executada. No momento em que o meu 'kludge' eh suficiente para os poucos relatorios que existem atualmente, mas a quantidade de relatorios disponiveis para o usuario ira crescer pouco a pouco e minha 'solucao' nao ficara sempre util Ate agora tenho tentado a sugestao de Rubem, mas recebo um erro Incompatible types Integer and tagSize here: if lFld is TNumericField then lCol.Width := StringExtent(lFld.EditMask, DBGrid1.Font) else lCol.Width := StringExtent(StringOfChar('Z', lFld.DisplayWidth),DBGrid1.Font); Vou continuar tentando . . . . . . Muito obrigado Abracos Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Matheus Nabao Sent: 30 November 2009 15:59 To: delphi-br@yahoogrupos.com.br Subject: RE: [delphi-br] Largura de colunas de DBGrid O seu exemplo usa tamanho fixo para todos os campos. Deve ser estranho. Você pode fazer isso com arquivo, onde você define as especificações dos tamanhos dos campos etc. E carrega na hora de criar a Grid. Mas afinal, o quê seria uma forma utilizável? *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
FW: [delphi-br] Largura de colunas de DBGrid
Usando textwidth em vez de textextent funciona, mas com lCol.Width := StringExtent(StringOfChar('Z', lFld.DisplayWidth),DBGrid1.Font) as larguras (col widths) sao muito grandes, e se tento lCol.Width := StringExtent(lFld.AsString,DBGrid1.Font) as larguras sao muito pequenas. Continuo a tentar . . . . . . . Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Wilson, Stephen Sent: 01 December 2009 09:20 To: delphi-br@yahoogrupos.com.br Subject: RE: [delphi-br] Largura de colunas de DBGrid Ate agora tenho tentado a sugestao de Rubem, mas recebo um erro Incompatible types Integer and tagSize here: if lFld is TNumericField then lCol.Width := StringExtent(lFld.EditMask, DBGrid1.Font) else lCol.Width := StringExtent(StringOfChar('Z', lFld.DisplayWidth),DBGrid1.Font); Vou continuar tentando . . . . . . Muito obrigado Abracos Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: FW: [delphi-br] Largura de colunas de DBGrid
Valeu, senhor(a) CRM. Perfeito, se mover as variaveis Totwidth e Varwidth dentro do for loop! Assim: procedure TForm1.AjustaColunas(DBGrid: TDBGrid); var i, j: integer; TotWidth : integer; VarWidth : integer; begin Q1.DisableControls; for i := 0 to -1 + DBGrid.Columns.Count do begin TotWidth := 0; VarWidth := 0; Q1.First; for j := 0 to Q1.RecordCount do begin TotWidth := Canvas.TextWidth(DBGrid.Columns[i].Field.Text); if TotWidth VarWidth then DBGrid.Columns[i].Width := TotWidth + 8; if VarWidth TotWidth then VarWidth := TotWidth; Q1.Next; end; end; Q1.First; Q1.EnableControls; end; Muito obrigado! E um grande obrigado e abraco a todos que responderam. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of CRM Desenvolvimentos Sent: 01 December 2009 10:35 To: delphi-br@yahoogrupos.com.br Subject: Re: FW: [delphi-br] Largura de colunas de DBGrid procedure TfrmForm.AjustaColunas(DBGrid: TDBGrid); var i, j: integer; TotWidth : integer; VarWidth : integer; begin TotWidth := 0; VarWidth := 0; dados.TABELA.DisableControls; for i := 0 to -1 + DBGrid.Columns.Count do begin dados.TABELA.First; for j := 0 to dados.TABELA.RecordCount do begin TotWidth := Canvas.TextWidth(DBGrid.Columns[i].Field.Text); if TotWidth VarWidth then DBGrid.Columns[i].Width := 8 + TotWidth; if VarWidth TotWidth then VarWidth := TotWidth; dados.TABELA.Next; end; end; dados.TABELA.First; dados.TABELA.EnableControls; end; *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Largura de colunas de DBGrid
Ola Rubem Eu gostaria de usar versao superior!! Uso Delphi 5. Acho que talvez eu nao explicou muito bem as minhas necessidades, e peco desculpa por isso. Como CRM mostrou, que eu precisava para percorrer os registros e descobrir o maior texto em cada campo e ajustar a largura para este tamanho. Agradeco muito pelo trabalho que voce fez em meu nome. Saudes S -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Rubem Nascimento da Rocha Sent: 01 December 2009 12:59 To: delphi-br Subject: RE: [delphi-br] Largura de colunas de DBGrid Importance: High Talvez vc esteja usando uma versão do Delphi superior a versão 7, que até hoje uso e tem dado conta do recado, seja projetos desktop, client-server, 'n'-camadas ou web. Sds. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Delphi Prism 2009
Muito obrigado, Bruno. Vou dar uma olhada neles hoje. Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br] On Behalf Of Bruno Lichot Sent: 03 November 2009 18:21 To: delphi-br@yahoogrupos.com.br Subject:RE: [delphi-br] Delphi Prism 2009 Vou deixar aqui um link com vários vídeos sobre Delphi Prism que também podem ajudar. São gratuitos. HTTP://cc.embarcadero.com/coderage Abs BL *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Ajuda - Importar TXT p/DB com delimitador
Caro Jose Nao posso explicar muito bem em Portugues, mas criei um exemplo que pode ajuda-lo: procedure TForm1.Button1Click(Sender: TObject); var s, st1,st2: string; oint: integer; f: textfile; begin AssignFile(f, 'CaminhoENomeDoTextoArquivo'); Reset(F); while not Eof(f) do ReadLn(f,s); s:= StringReplace(s,#34,'',[rfReplaceAll]); st1:= copy(s,1,pos(',',s)-1); ?? separador e uma virgula delete(s,1,pos(',',s)); oint:= strtoint(copy(s,1,pos(',',s)-1)); delete(s,1,pos(',',s)); st2:= s; // Aqui gravar os dados para o banco, por exemplo: // INSERT INTO Table(Col1,Col2,Col3) VALUES(:val1,:val2,:val3) // Parameters.ParamByName(;val1).Value:= st1; // Parameters.ParamByName(;val1).Value:= oint; // Parameters.ParamByName(;val1).Value:= st2; // ExecSQL; CloseFile(F); end; Atenciosamente Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br] On Behalf Of Ferreira Sent: 04 November 2009 14:05 To: delphi-br@yahoogrupos.com.br Subject:[delphi-br] Ajuda - Importar TXT p/DB com delimitador Caros Colegas do Grupo. Preciso de uma ajuda na importação de dados de um arquivo TXT que tem delimitadores de texto, p/que eu possa gerar uma tabela temporária. Se o texto estivesse em um local determinado era beleza, mas está com delimitadores. Segue a baixo uma linha do arquivo para Vcs terem uma idéia. Obs.: Os dados do tipo varchar estão entre aspas duplas e numérico não, e estão separados por virgula. Grupo 90;1331;90.00 Grato, José Ferreira *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] uma ideia de como fazer
Boa tarde Alessandra Talvez possa usar a propriedade MultiSelect num DBGrid. De uma olhada a esse link que sugeriu Berdam hoje cedo respondendo a uma pergunta de Allan Rosa (Excluir varios itens atraves do DBGrid): http://delphi.about.com/od/usedbvcl/l/aa032503a.htm Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br] On Behalf Of alessandra porto Sent: 04 November 2009 16:26 To: lista-del...@yahoogrupos.com.br; delphi-br@yahoogrupos.com.br Subject:[delphi-br] uma ideia de como fazer Tenho uma tabela no BD que possui por exemplo 10 registros gostaria de criar em um form algum tipo de exibir esses 10 registros com um checkbox para cada registro e quando marcado o checkbox eu estaria selecionando aquele registro para impressão a ideia é como criar o numero de checkbox conforme o numero de registros desta tabela? ou teria uma forma mais pratica para selecionar registros para ser impressos? agradeço a todos que colaborarem *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
[delphi-br] Delphi Prism 2009
Boa tarde a todos Por favor, uma pergunta antes de ir para casa: Alguem na lista tem experiencia em usar o Delphi Prism? Gostaria de saber quais sao as vantagens e desvantagens em comparacao com outros metodos de desenvolvimento de dot net (nao so a linguagem Pascal?). Sou grato por quaisquer comentarios pessoal gostariam de oferecer. Atenciosamente Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ** Please consider the environment before printing this email. ** ***
RE: [delphi-br] Re: focus stringgrid
Boa tarde Joanes Acho que nao e possivel saber quando sai da coluna 1, mas pode saber quando voce entra em outra celula usando o evento OnSelectCell Por exemplo: procedure TForm1.SG1SelectCell(Sender: TObject; ACol, ARow: Integer;var CanSelect: Boolean); var i: integer; begin for i:= 2 to 8 do SG1.Cells[i,ARow]:= inttostr(strtoint(SG1.Cells[1, ARow]) * i); end; Nao sei se isso vai ajudar, porque nao estou certo de que voce precisa Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br] On Behalf Of Joanes J. Chiesa Sent: 06 October 2009 16:29 To: delphi-br yahoogrupos Subject:[delphi-br] Re: focus stringgrid Bom dia, alguém tem alguma ideia de como implementar a questao abaixo? pesquisei na internet mas nao achei nada, ou talvez alguém possa sugerir algo semelhante. deve haver um jeito de implementar isto pois ja vi em muitos programas. Obrigado, Joanes --- Em seg, 28/9/09, Joanes J. Chiesa inconscient...@yahoo.com.br escreveu: De: Joanes J. Chiesa inconscient...@yahoo.com.br Assunto: focus stringgrid Para: delphi-br yahoogrupos delphi-br@yahoogrupos.com.br Data: Segunda-feira, 28 de Setembro de 2009, 23:56 Boa noite pessoal, Gostaria de implementar a seguinte funcionalidade: ao digitar algum valor na primeira coluna de um stringgrid, gostaria que os valores fossem carregados nas demais células da linha. O que não estou conseguindo é criar um modo de saber quando eu sai da coluna 1. Tentei os eventos (Onsetedittext e OngetEditText) mas estes eventos não são para esta finalidade. Encontrei no google este exemplo porém não consegui implementá-lo e também não tenho certeza se funciona corretamente. Talvez alguém com mais experiência saiba informar se isto realmente funciona. http://forum.devmedia.com.br/viewtopic.php?p=241870sid=f52f0f499a2c0fb202348082291d64df Alguém poderia me ajudar? ou dar alguma dica para criar esta implementação? Obrigado, Joanes Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] [MAF] Exportar dados para Excel
Bom dia tente assim: ExcelApp := CreateOleObject('Excel.Application'); ExcelApp.Visible := false; ExcelApp.DisplayAlerts := false; ExcelApp.WorkBooks.Add; for i := 1 to 3 do begin //ExcelApp.WorkBooks[1].WorkSheets.Add;Nao precisa desta linha, ja que existem automaticamente tres 'sheets' ExcelApp.WorkBooks[1].Worksheets[i].Name := IntToStr(i); alterar os nomes das tres 'sheets' existentes end; for i := 4 to 10 do begin ExcelApp.WorkBooks[1].WorkSheets.Add; ExcelApp.WorkBooks[1].Activesheet.Name := IntToStr(i);aqui usar Activesheet em vez de Worksheets[i] end; //i := i + 1; Este valor nao e usado ExcelApp.WorkBooks[1].WorkSheets.Add; ExcelApp.WorkBooks[1].Activesheet.Name := 'Final'; Testei este e funciona para mim. Espero ter ajudado .. .. Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of m_abreuferreira Sent: 22 September 2009 23:28 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] [MAF] Exportar dados para Excel Pessoal, fiz um programa para exportar dados para o Excel. Preciso criar dentro do mesmo XLS várias Worksheets. Pelo programa que fiz ele cria uma a mais e não está colocando o nome delas corretamente. Alguém já teve algum problema parecido? Segue abaixo o programa que fiz. Marcos Ferreira unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComObj; type TForm1 = class(TForm) Button1: TButton; procedure ExportDBGrid(toExcel: Boolean); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.ExportDBGrid(toExcel: Boolean); var i: Integer; ExcelApp: Variant; begin if toExcel then begin ExcelApp := CreateOleObject('Excel.Application'); ExcelApp.Visible := false; ExcelApp.DisplayAlerts := false; ExcelApp.WorkBooks.Add; for i := 1 to 10 do begin ExcelApp.WorkBooks[1].WorkSheets.Add; ExcelApp.WorkBooks[1].WorkSheets[i].Name := IntToStr(i); end; i := i + 1; ExcelApp.WorkBooks[1].WorkSheets.Add; ExcelApp.WorkBooks[1].WorkSheets[i].Name := 'Final'; ExcelApp.Visible := true; end; end; procedure TForm1.Button1Click(Sender: TObject); begin ExportDBGrid(True); end; end. -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Uma pergunta sobre menus
Ola Juan pode baixar aqui o TMenubar que tem uma propriedade cor: http://www.borland.com/devsupport/delphi/download_files/menubar.zip Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of fer mol Sent: 23 September 2009 15:32 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Uma pergunta sobre menus Bom dia. Gostaria de saber se de alguma forma mudar a cor da barra de menu principal sem o uso de pele. Se alguém souber de algum método para saber que eu poderia fazer. Desde já muito obrigado. Juan Molina Yahoo! Cocina Encontra las mejores recetas con Yahoo! Cocina. http://ar.mujer.yahoo.com/cocina/ [As partes desta mensagem que não continham texto foram removidas] *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Contagem de Componentes
Ola Jose procedure TForm1.Button1Click(Sender: TObject); var c,i: integer; begin c:= 0; for i:= 0 to ComponentCount-1 do if (Components[i] is TCheckbox) and TCheckBox(Components[i]).Checked then inc(c); showmessage(inttostr(c)); end; Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Jose Newton Araujo Sent: 18 September 2009 14:49 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Contagem de Componentes Senhores: Estando com um pepino para resolver, preciso de uma colher de chá dos companheiros. Tenho um grupo Box contendo 7 CheckBox(s). Preciso saber quantos estão Checked(s). E agora? Sds corinthianas a todos, Jose Newton *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
FW: [delphi-br] Contagem de Componentes
Jose A solucao de Luciano e melhor que a minha. Eu nao verifiquei que os Checkboxes estavam dentro do GroupBox, Luciano verificou. Cuprimentos Steve -Original Message- From: Wilson, Stephen Sent: 18 September 2009 15:22 To: 'delphi-br@yahoogrupos.com.br' Subject: RE: [delphi-br] Contagem de Componentes Ola Jose procedure TForm1.Button1Click(Sender: TObject); var c,i: integer; begin c:= 0; for i:= 0 to ComponentCount-1 do if (Components[i] is TCheckbox) and TCheckBox(Components[i]).Checked then inc(c); showmessage(inttostr(c)); end; Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Jose Newton Araujo Sent: 18 September 2009 14:49 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Contagem de Componentes Senhores: Estando com um pepino para resolver, preciso de uma colher de chá dos companheiros. Tenho um grupo Box contendo 7 CheckBox(s). Preciso saber quantos estão Checked(s). E agora? Sds corinthianas a todos, Jose Newton *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] ir DBEdit para a primeira linha do Dgrid
Boa tarde, Sergio procedure TForm1.DBEdit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key = VK_DOWN then OMeuDBGrid.SetFocus; end; Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Gestão - Premium Sent: 18 September 2009 16:20 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] ir DBEdit para a primeira linha do Dgrid Boa tarde se alguem poder ajudar ficaria grato. Gostaria de sair do DBEdit e precionar a seta pra baixo e ir na primeira linha do meu DGrid. Atenciosamente, Sérgio E. Santo Depto. Gestão US - US 001 degest.prem...@terra.com.br Premium - Responsabilidade e Garantia na Pratica Diária de Bem Atender 11 - 3378-4501 35 - 3422-9949 *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Campo Memo no SQL Server 2000
Ola Stainle, bom dia Voce digita os dados em outros campos ao mesmo tempo? Lembre-se que o tamanho maximo de linha no SQL Server 2000 e 8060 bytes. Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of stainle2003 Sent: 14 September 2009 18:50 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Campo Memo no SQL Server 2000 boa tarde, estou precisando gravar dados como se fosse campo memo, não estou conseguindo, uso Delphi 7 e SQLServer 2000; criei um campo tipo varchar com tamanho 8000, não sei porque ele grava até um certo limite dos dados que digito num campo memo e depois antes do post eu transfiro para o campo varchar tamanho 8000 mas não consigo gravar tudo que digitei, com um campo text que criei eu nem consigo gravar os dados nele, engraçado é que pelo Enterprise Manager eu consigo digitar os dados que aparecem no campo memo do DELPHI. se alguém tiver alguma dica, será muito benvinda. grato Stainle -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Campo Memo no SQL Server 2000
Me desculpe se nao entendi o seu problema, mas eu tenho campos em Queries (TADOQuery) de Size 600 e mais. Voce olha os dados da tabela no Enterprise Manager? Se os dados em seu memorando contem Linefeeds(#13#10), nem todos os dados estao visiveis na tabela de SQL, a primeira vista. Voce poderia tentar removendo os line feeds? Se voce ja sabe todo isso , peco desculpa . cuprimentos Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Nivaldo Stainle Sent: 15 September 2009 14:02 To: delphi-br@yahoogrupos.com.br Subject: RE: [delphi-br] Campo Memo no SQL Server 2000 na tabela criei como varchar(8000), o máximo que me deixa digitar, no componente QUERY, o campo começa com 255 na propriedade SIZE, qual seria o valor que devo colocar, eu faço a leitura do registro e coloco este campo no componente MEMO e para gravar eu leio o memo e atribuo ao campo, só que ele não consegue gravar tudo que digito no memo, o que eu gostaria era de saber o máximo que posso digitar, estou vendo que tenho que criar mais de um campo memo no SQLServer. grato Stainle *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Erro ao enivar e-mail
Ola Eduardo O Google tem alguns resultados interessantes (para 554 Refused). Uma sugestao e que talvez haja um problema com a configuracao de um dos servidores de correio. Voce recebe a mesma mensagem com qualquer destinatario? Lamento que eu nao posso ajudar mais. Atenciosamente Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Eduardo Silva Sent: 01 September 2009 12:17 To: delphi-br@yahoogrupos.com.br Subject: RES: [delphi-br] Erro ao enivar e-mail O destinatário é válido. Não sei mais o que pode estar acontecendo. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Ajuda.....excel delphi
Ola Rodrigo Quais sao as condicoes, e que voce quer que aconteca quando a condicao for satisfeita? Abaixo ha um exemplo em que as celulas se tornam verde se o valor numa delas fique entre 2 e 5 procedure TForm1.Button1Click(Sender: TObject); var op,f1,f2:oleVariant; begin op:= xlBetween; f1:= 2; f2:=5; WS1.Range(qualquer intervalo de cells).FormatConditions.Add(xlCellValue,op,f1,f2); WS1.Range(qualquer intervalo de cells).FormatConditions[0].Interior.ColorIndex:= clGreen; end; Este hiper pode fornecer alguma ajuda se voce leia ingles - infelizmente nao esta disponivel em Portugues: http://msdn.microsoft.com/pt-br/library/aa174221(en-us,office.11).aspx Espero que isso faca sentido. Me desculpe pelo meu Portugues. Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of rodrigoojapa Sent: 27 August 2009 20:50 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Ajuda.excel delphi Boa tarde Pessoal, tenho uma aplicação que verifica algumas condições no excel, e eu gostaria de pintar as celulas do excel quando a condição for satisfeita. Alguem pode me ajudar.. -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Ajuda.....excel delphi
.. Abaixo e o que eu estava procurando. Mais uma vez ele esta em ingles, mas eu acho que possa ser muito util: http://www.djpate.freeserve.co.uk/AutoExcl.htm#FormatRange Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of rodrigoojapa Sent: 27 August 2009 20:50 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Ajuda.excel delphi Boa tarde Pessoal, tenho uma aplicação que verifica algumas condições no excel, e eu gostaria de pintar as celulas do excel quando a condição for satisfeita. Alguem pode me ajudar.. -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br]
Boa tarde Guilherme (e tarde pelo menos aqui) SELECT count(*) FROM Tabela ou SELECT count(campo de chave primaria) FROM Tabela Isso nao e do que voce precisa? Cuprimentos Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Guilherme Ventura de Souza Sent: 28 August 2009 12:39 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Bom dia pessoal, estou com um problema para criar uma query Alguém conhece alguma forma de criar um contador(count) no SQL Server Acredito que usando o ROW_NUMBER seja o caminho, mas não consegui fazer progresso. -- Guilherme Ventura de Souza [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] ROWID
Boa tarde Bruno Acho que o SQL Server nao tenha a propriedade de rowid (tal com existe em Oracle), embora nao esteja certo sobre SQL Server 2008. Pode usar um campo 'IDENTITY' ? Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Bruno Stort Sent: 21 August 2009 14:13 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] ROWID Estava precisando do ROWID do SQL Server. Alguém sabe? [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: RES: [delphi-br] Novo vírus infecta a Lib do Delphi
Bom dia a todos Os colegas que leiam Ingles talvez gostariam de dar uma olhada nisso (e ligacoes): http://www.builderau.com.au/news/soa/Developers-Are-you-spreading-malware-when-you-code-/0,339028227,339298050,00.htm Cumprimentos Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Silvio Clecio Sent: 20 August 2009 05:27 To: delphi-br@yahoogrupos.com.br Subject: Re: RES: [delphi-br] Novo vírus infecta a Lib do Delphi Em 19/8/2009 13:41, EmbarcaDelphi escreveu: Eu não estou infectado, mas já fiz uma cópia de todos os SysConst.dcu e SysConst.pas da pasta Lib e da pasta Lib\Debug, também da pasta Source\Rtl\Sys para .Bak para prevenir isso aqui ... Eu também, fiz uma cópia para e outra em ???, caso ele(s) ferre(m) XXX???, eu restauro os %%%???XXX :). Desculpe a brincadeira, mas passar detalhes do que você esta fazendo, dependendo da intenção delphi serial killer, quando você menos esperar ele vai estar aí (se aparecer por aí manda uma cópia pra mim ;) ), igual a Jason, sexta... 13... -- Silvio Clecio. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Localizar as tabelas no SQL Server
Ola Bruno select table_name from INFORMATION_SCHEMA.Tables Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Bruno Stort Sent: 18 August 2009 15:22 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Localizar as tabelas no SQL Server No oracle quando executo: SELECT TABLE_NAME FROM USER_TABLES Aparece todas as tabelas do banco. Queria saber como que faço isso no SQL Server. Obrigado. [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Localizar as tabelas no SQL Server
Desculpe. Nao lembrei-me dizer where TABLE_TYPE = 'BASE TABLE' , se voce nao precisa ver os 'Views' tambem select * from INFORMATION_SCHEMA.Tables where TABLE_TYPE = 'BASE TABLE' Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Bruno Stort Sent: 18 August 2009 15:22 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Localizar as tabelas no SQL Server No oracle quando executo: SELECT TABLE_NAME FROM USER_TABLES Aparece todas as tabelas do banco. Queria saber como que faço isso no SQL Server. Obrigado. [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Re: Problemas ao ordenar dbgrid pela coluna
Pode ser assim? OnTitleClick SqlStr = 'SELECT ALGUMA COISA FROM TABELA '; sqlStr:= sqlStr + 'ORDER BY ' + Column.FieldName Espero ter ajudado Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of gugavolcom Sent: 15 August 2009 04:29 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Re: Problemas ao ordenar dbgrid pela coluna Beleza amigo, já me ajudou muuitíssimo, o problema, é que quando clico mais de uma vez por exemplo, ele dá erro, pq com certeza o sql deve ficar da seguinte forma: SELECT ALGUMA COISA ORDER BY ALGUMA COISA ORDER BY OUTRA COISA, daí dá erro, tô tentando fazer com que o sql do adoquery receba o select sem order by pra poder ordenar novamente, se tiver alguma dica, agradeço! Abraço! -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Listar campos de Select
Bom dia, Ricardo Voce quer fazer isso antes ou apos da consulta foi executada? Se apos: for i := 0 to DatasetRetornadoPelaConsulta.FieldCount - 1 do SL.Add (DatasetRetornadoPelaConsulta.Fields[i].FieldName) Se antes: como voce decide quais campos a incluir na declaracao SELECT? Espero que eu compreendam a sua pergunta corretamente . . . . Att. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Ricardo Mendes Sent: 17 August 2009 14:52 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Listar campos de Select Bom dia a todos. Gostaria de uma ajuda de vcs. Estou precisando listar os campos que são referentes a um select. Ex: Select nome, codigo, endereco, status from clientes. Eu preciso colocar os campos nome, codigo, endereco e status em um stringlist. Tem como fazer isso? Att.: Ricardo Mendes -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [Bulk] [delphi-br] Re: agregar ayuda a mi aplicacion
Caros Ricardo e Silvio Obrigado pelas suas amaveis palavras, mas, embora tenha sido a algumas aulas Portuguesas, posso garantir que eu nao seria capaz de compor os meus emails sem a ajuda do Google Translate; alem disso sempre que tento falar em Portugues tem a lingua presa - os Ingleses sao famosos por nao falar bem linguas estrangeiras! Como eu disse antes, se voce tiver qualquer duvida sobre Ingles pode ser melhor para enviar um e-mail off lista, porque estou consciente de que este e um forum Delphi, nao e uma aula de linguagens. Cumprimentos Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Ricardo César Cardoso Sent: 03 August 2009 20:12 To: delphi-br@yahoogrupos.com.br Subject: RE: [Bulk] [delphi-br] Re: agregar ayuda a mi aplicacion Pode deixar Steve, com certeza usaremos seu conhecimento em inglês sempre que necessário e por incrível que pareça o seu português é até melhor que o de muitos brasileiros, mas se houver algum erro grave (erros sutis são difíceis de notar) que impeça a compreensão, notificamos. Atenciosamente, Ricardo. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [Bulk] [delphi-br] Re: agregar ayuda a mi aplicacion
Ola, bom dia Silvio e outros que estao estudando inglês Se algum de voces pensa a qualquer momento que eu poderia ajudar de alguma forma com o seu ingles, se senta livre para enviar-me um email diretamente e vou tentar ajudar o melhor que posso. Talvez eu nao seja capaz de ajudar muito com Delphi, mas o ingles tenho sido muito familiarizado com ele toda a minha vida :-) Da mesma forma, quando quer que eu faca um erro em Portugues, ficaria feliz se alguem me corrigir - off lista claro! Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Silvio Clecio Sent: 03 August 2009 02:29 To: delphi-br@yahoogrupos.com.br Subject: Re: [Bulk] [delphi-br] Re: agregar ayuda a mi aplicacion Estou estudando inglês, e mesmo desajeitado dou uns pitacos lá fora, eles (os gringos) aceitam de boa e sempre dão um retorno se deu certo ou não; vez ou outra preciso falar além do br e en, bom, dou meus pulos (virtual machine) e tento ajudar de alguma forma; vem dando certo. -- []'s, Silvio Clécio --- *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
[delphi-br] (unknown)
Alguem pode me ajudar com este problema, por favor? Quero destacar os itens em uma TListbox quando o mouse passa sob ele, como na lista suspensa de um TCombobox. Como posso conseguir isso eu mesmo, ou alguem sabe de um componente de terceiros que poderia usar? Uso Delphi 5 Obrigado por qualquer ajuda Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
[delphi-br] RE:Listbox itens (foi Unknown)
Bom dia a todos Caso alguem estiver interessado, consegui resolver o meu problema . Isto funciona, mas nao e muito elegante: procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin with Listbox1.Canvas do begin Brush.Color:= clWhite; FillRect(Rect); Font.Color:= clBlack; TextOut(Rect.Left+1,Rect.Top+1,ListBox1.Items[Index]); end; end; procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var p: TPoint; i,j: integer; begin p.x:= X; p.y:= Y; i:= ListBox1.ItemAtPos(p,False); if (i -1) then begin for j:= 0 to Listbox1.Items.count-1 do begin if j i then with Listbox1.Canvas do begin Brush.Color := clWhite; FillRect(Listbox1.ItemRect(j)); Font.Color:= clBlack; end else with Listbox1.Canvas do begin Brush.Color := clActiveCaption; FillRect(Listbox1.ItemRect(j)); Font.Color:= clWhite; end; Listbox1.Canvas.TextOut(Listbox1.ItemRect(j).Left + 1,Listbox1.ItemRect(j).Top+1,ListBox1.Items[j]); end; end; end; Deve existir uma melhor maneira de realizar a mesma coisa, nao eh? Nao sei muito sobre o Windows SDK - eh uma de minhas grandes faltas muitas felicidades Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Wilson, Stephen Sent: 10 July 2009 11:27 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] (unknown) Alguem pode me ajudar com este problema, por favor? Quero destacar os itens em uma TListbox quando o mouse passa sob ele, como na lista suspensa de um TCombobox. Como posso conseguir isso eu mesmo, ou alguem sabe de um componente de terceiros que poderia usar? Uso Delphi 5 Obrigado por qualquer ajuda Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] RE:Listbox itens (foi Unknown)
Ola Moacir Estou grato pela sua ajuda e que voce esforcou-se no meu interesse. Muito obrigado. Cordialmente Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Moacir - GMail Sent: 10 July 2009 17:03 To: delphi-br@yahoogrupos.com.br Subject: Re: [delphi-br] RE:Listbox itens (foi Unknown) Wilson, Dei uma googlada e achei este codigo, veja se satisfaz tuas necessidades: procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin ListBox1.Canvas.FillRect(Rect); if ListBox1.Items.Strings[index] = Edit1.Text then ListBox1.Canvas.Font.Color := clRed; ListBox1.Canvas.TextOut(Rect.TopLeft.x,Rect.TopLeft.y,ListBox1.Items.Strings[index]); end; depois no OnClick do botão coloque este código: procedure TForm1.Button1Click(Sender: TObject); begin ListBox1.Repaint; end; Sucesso !! Moacir Wilson, Stephen escreveu: Bom dia a todos Caso alguem estiver interessado, consegui resolver o meu problema . Isto funciona, mas nao e muito elegante: procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin with Listbox1.Canvas do begin Brush.Color:= clWhite; FillRect(Rect); Font.Color:= clBlack; TextOut(Rect.Left+1,Rect.Top+1,ListBox1.Items[Index]); end; end; procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var p: TPoint; i,j: integer; begin p.x:= X; p.y:= Y; i:= ListBox1.ItemAtPos(p,False); if (i -1) then begin for j:= 0 to Listbox1.Items.count-1 do begin if j i then with Listbox1.Canvas do begin Brush.Color := clWhite; FillRect(Listbox1.ItemRect(j)); Font.Color:= clBlack; end else with Listbox1.Canvas do begin Brush.Color := clActiveCaption; FillRect(Listbox1.ItemRect(j)); Font.Color:= clWhite; end; Listbox1.Canvas.TextOut(Listbox1.ItemRect(j).Left + 1,Listbox1.ItemRect(j).Top+1,ListBox1.Items[j]); end; end; end; Deve existir uma melhor maneira de realizar a mesma coisa, nao eh? Nao sei muito sobre o Windows SDK - eh uma de minhas grandes faltas muitas felicidades [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] sql- selecionas os mesmos dados em duas tabelas
Ola Sergio select codproduto,Nomeproduto, quantidade from produtoent Union All select codproduto,Nomeproduto, quantidade from custos Order By (incluir o numero de coluna 'data') Espero que ajude isso Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Sergio - Jundiaí / SP Sent: 08 July 2009 21:37 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] sql- selecionas os mesmos dados em duas tabelas Boa tarde alguem poderia me dar uma luz estou querendo selecionar os mesmos dados em duas tabelas (produtoent e custos) em ordem de data select codproduto,Nomeproduto, quantidade from produtoent, custos order by data desde já agradeço [As partes desta mensagem que não continham texto foram removidas] *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Data e Hora de Arquivos
Use Date em vez de Now: procedure TForm1.Button1Click(Sender: TObject); var myTime, myDate: TDateTime; begin myDate:= Date + 30; myTime:= EncodeTime(0, 0, 0, 0); showmessage(DateTimeToStr(myDate) + ' ' + TimeToStr(myTime)); end; Ou poderia utilizar FormatDateTime? Att Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of embarcadelphi Sent: 03 July 2009 17:02 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Data e Hora de Arquivos Boa tarde pessoal... Estou todo enrolado no trabalho com datas e horas, conversão, etc... Utilizei EncodeData,EncodeTime,FormatDateTime e não consigo criar uma situação como o caso abaixo. Tenho uma função que altera a data e a hora de um arquivo (funcionando). vData := (Now + 30); // 30 dias após a data atual vHora := EncodeTime(00, 00, 0, 0); // A hora DEVE ficar 00:00:00 Como faço para alocar numa variável do tipo TDateTime as duas situações acima? Como disse no início, já tentei com diversos tipos e quando testava com um ShowMessage(DateToStr(variavel)); não funcionava, a desgraçada da hora mostrava SEMPRE a hora atual, é o inferno isso! Quero que fique a data que está na variável vData e a hora que está na variável vHora. Ambos numa só variável do tipo TDateTime. Grato *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] [OFF] Curiosidades da lista Delphi-BR
Comparando os seus totais com os da Delphi-en voce pode ver quanto o Delphi eh suportado em Brasil (em comparacao com Inglaterra) ! -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of embarcadelphi Sent: 03 July 2009 17:43 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] [OFF] Curiosidades da lista Delphi-BR Imagino que esta é a maior lista de Delphi existente no idioma português-Br, ainda bem que estou cadastrado nela. blz *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
[delphi-br] Screen Resolution
Bom dia a todos lguem pode me ajudar, por favor? Eu preciso conhecer a resolucao da tela durante o tempo de execucao. Quero definir o tamanho e posicao dos controles em um form de acordo com a resolucao da tela. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
[delphi-br] Resolucao de tela
Bom dia a todos Alguem pode me ajudar, por favor? Preciso saber a resolucao da tela em que o meu programa esta sendo executado, para que eu possa definir o tamanho e posicao dos controles no form. Como posso descobrir a resolucao da tela? Uso Delphi 5. Agradecemos antecipadamente por qualquer ajuda. Att Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Resolucao de tela
Eh claro! Meus agradecimentos a voce, Rubem, e ao Alexandre Nicolas Atenciosamente Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Rubem Rocha Sent: 02 July 2009 16:25 To: delphi-br@yahoogrupos.com.br Subject: RES: [delphi-br] Resolucao de tela Importance: High Não sei se pra Delphi 5 vai te valer (trabalho e adoro o Delphi 7), mas em todo caso... informe-se sobre a classe TScreen, a objeto singleton Screen e as propriedades Width e Height deste objeto. Sds. *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Problema de Lentidão (SQL)
Bom dia, Fernando Poderia fazer isso em uma operacao, assim: Insert Into TabelaDestino(Campo1,ampo2,Campo3) Select Campo1,Campo2,Campo3 From TabelaFonte ?? Sera muito rapido (menos que1 sec para 4000 registros em meus dados) - talvez demasiado rapido para mostrar progressao com um progressbar Atenciosamente Steve -Original Message- Opa, Sou iniciante em delphi, to com o seguinte problema: Tenho que importar dados de uma tabela para a outra, seus campos sao iguais. uso a seguinte logica: tenho duas querys no form, uma qry_fonte(de onde vou pegar os dados da tabela que quero importar), e colocar na outra tabela que criei, na qry_Destino. de primeiro, faco um select * pra pegar tds os campos da tabela fonte, e depois, faco um insert campo a campo na tabela de destino, ex: -- QRY_Fonte.sql.Clear; QRY_Fonte.SQL.Add('Select * From [TabelaFonte]'); QRY_Fonte.Open; while Not QRY_Fonte.Eof do begin with QRY_Destino do begin sql.Clear; Sql.Add('Insert Into [TabelaDestino] ('); SQL.Add('campo1, campo2, campo3'); SQL.Add(') Values ('); SQL.Add(QuotedStr(QRY_Fonte.FieldByName('Campo1').AsString)+','); SQL.Add(QuotedStr(QRY_Fonte.FieldByName('Campo2').AsString)+','); SQL.Add(QuotedStr(QRY_Fonte.FieldByName('Campo3).AsString)+','); etc... ExecSql; ProgressBar1.Position := ProgressBar1.Position + 1; Application.ProcessMessages; QRY_Fonte.Next; end; end; qry_Fonte.close; Funciona, mais ta MUIITOO lento!!! pra importar 150 reg de uma tabela pra outra demora um pouco mais de 1 Minuto. e tenho tabelas aqui com mais de 8.000. oq pode ta errado, e se alguem conhece uma forma melhor e mais rapida de manipular esses dados? Atenciosamente Fernando Pires __ Conheça os novos produtos Windows Live! Clique aqui. http://www.windowslive.com.br [As partes desta mensagem que não continham texto foram removidas] -- ... Eduardo Silva dos Santos DRD SISTEMAS (27) 3218-4201 (27) 9961-7095 MSN: eduardo@gmail.com Site: http://www.drdsistemas.com.br/ ... [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Re: Validar Celula de uma String Grid
Bom dia Nao estou familiarizado com a sua aplicacao, por isso eh dificil para mim saber em qual evento colocar a validacao - depende do que vc esta tentando realizar. Se eh possivel utilizar um Dbgrid, como disse Ricardo, seria mais simples; senao, talvez vc poderia explicar mais o que esta fazendo? Lamento que nao possa ajudar mais. Atenciosamente Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of dhsb Sent: 28 May 2009 17:48 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Re: Validar Celula de uma String Grid Ate pensei isso, mas em qual evento colocar estes testes? Aguardo... --- Em delphi-br@yahoogrupos.com.br, Wilson, Stephen stephen.wil...@... escreveu Talvez voce poderia utilizar as funções de strtodate e strtoint dentro de try .. except blocos. Se existe uma excepção, o valor não é uma data / número com desculpas pelo meu Português, espero ter ajudado. Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Validar Celula de uma String Grid
Talvez voce poderia utilizar as funções de strtodate e strtoint dentro de try .. except blocos. Se existe uma excepção, o valor não é uma data / número com desculpas pelo meu Português, espero ter ajudado. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of dhsb Sent: 28 May 2009 13:27 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Validar Celula de uma String Grid Pessoal como posso validar o texto ao sair da celula de um string grid? Exemplo verificar se a celula e um numero ou uma data... Valeu! -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
[delphi-br] Pegar dados quando form e minimizado
Bom dia a todos (e obrigado, Ricardo - voce esta muito amavel) Alguem pode dar-me ajuda? Quando mais de uma e visivel, as formas no meu projeto podem ser minimizadas individualmente utilizando CreateParams, assim: procedure TJbForm.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; end; Agora eu preciso que ums dados sejam armazenados num base de dados sempre que o form e minimizado (como eu preciso de um evento OnMinimize), Alguem tem alguma sugestao como posso conseguir isso? Att Steve *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Outra cor em linha do dbGrid
Ola Vanessa Nao estou familiarizado com Delphi 2007, mas este código poderia dar lhe uma dica: procedure TMainForm.DBG1DrawColumnCell(Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); begin if gdSelected in State then// quando a linha esta selecionada begin (Sender as TDBGrid).Canvas.Brush.Color := $91B9B6 (Sender as TDBGrid).Canvas.Font.Style:=[fsBold]; (Sender as TDBGrid).Canvas.Font.Color:= $010101; end else // outros criterios try if ((Sender as TDBGrid).DataSource.DataSet.FieldByName('Priority').AsInteger = 2) then begin if daysDiff(date, (Sender as TDBGrid).DataSource.DataSet.FieldByName('DateIn').AsDateTime) =28 then (Sender as TDBGrid).Canvas.Brush.Color := $A5A5EF else if daysDiff(date, (Sender as TDBGrid).DataSource.DataSet.FieldByName('DateIn').AsDateTime) =14 then (Sender as TDBGrid).Canvas.Brush.Color := $0052E3F4; // $0052E3F4 end else if ((Sender as TDBGrid).DataSource.DataSet.FieldByName('Priority').AsInteger = 1) then begin if daysDiff(date, (Sender as TDBGrid).DataSource.DataSet.FieldByName('DateIn').AsDateTime) =7 then (Sender as TDBGrid).Canvas.Brush.Color := $A5A5EF // $FF else if daysDiff(date, (Sender as TDBGrid).DataSource.DataSet.FieldByName('DateIn').AsDateTime) =4 then (Sender as TDBGrid).Canvas.Brush.Color := $0052E3F4; end except on EConvertError do end; (Sender as TDBGrid).DefaultDrawColumnCell(Rect, DataCol, Column, State); end; Espero que isso possa ajudar . Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Vanessa Oliveira Sent: 13 January 2009 17:24 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Outra cor em linha do dbGrid Boa tarde pessoal Preciso que em um DbGrid em delphi 2007 apareça só 1 linha em outra cor e o restante continue em preto.Alguém pode me ajudar?? Desde já agradeço -- Atenciosamente Vanessa Oliveira [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Ultimos lançamentos
Eu uso SQL Server, e voce tem razao com 'SELECT TOP 100 .' -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Paulo Coutinho Sent: 30 December 2008 03:07 To: delphi-br@yahoogrupos.com.br Subject: Re: [delphi-br] Ultimos lançamentos To SqlServer tem o TOP. acho que é assim, mas Não tenho certeza: *SELECT TOP 100 * FROM tabela* abs. 2008/12/29 Alisson Yahoo alss...@yahoo.com.br Nao sei a sintaxe no SQL server, mas no Firebird voce pode selecionar os 100 primeiros da seguinte forma: SELECT first 100 Campo1, Campo2, Campo3... FROM Tabela Voce pode também fazer a consulta e jogar os 100 primeiros registros para um clientdataset __ Faça ligações para outros computadores com o novo Yahoo! Messenger http://br.beta.messenger.yahoo.com/ -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM -- Atenciosamente, Paulo Coutinho. Site: www.prsolucoes.com Msn: pa...@prsolucoes.com Skype: paulo.prsolucoes [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Ordenar TTable
Eu concordo que usando TQuery e provavelmente melhor (SELECT * FROM aTabela ORDER BY aColuna), mas talvez vc precisa TTable.AddIndex em tempo de execucao? Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:delphi...@yahoogrupos.com.br]on Behalf Of Marx Gentil Sent: 18 December 2008 14:29 To: delphi-br@yahoogrupos.com.br Subject: Res: [delphi-br] Ordenar TTable É possível usando TQuery, com TTable eu desconheço. De: Juliano Silva - Yahoo smjjuli...@yahoo.com.br Para: delphi-br@yahoogrupos.com.br Enviadas: Quinta-feira, 18 de Dezembro de 2008 10:38:53 Assunto: [delphi-br] Ordenar TTable Pessoal, bom dia Alguém já precisou Ordenar um TTable em tempo de execução? É possível? att. Juliano Silva [As partes desta mensagem que não continham texto foram removidas] Veja quais são os assuntos do momento no Yahoo! +Buscados http://br.maisbuscados.yahoo.com [As partes desta mensagem que não continham texto foram removidas] -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***
RE: [delphi-br] Duvidas com SQL
Ola Talvez voce deve usar diferentes parametros, assim: select * from EMITIDOS where (day(DTEMISSAO_CHEMITIDOS)= :dd and month (DTEMISSAO_CHEMITIDOS)= :mm and year(DTEMISSAO_CHEMITIDOS)= :aa)) or (day(DTCOMP_CHEMITIDOS)=:dd2 and month(DTCOMP_CHEMITIDOS)=:mm2 and year (DTCOMP_CHEMITIDOS)=:aa2) or (day(DTVENC__CHEMITIDOS)=:dd3 and month (DTVENC__CHEMITIDOS)=:mm3 and year(DTVENC__CHEMITIDOS)=:aa3) Perdoem-me se o meu Portugues nao e bom .. Steve -Original Message- From: delphi-br@yahoogrupos.com.br [mailto:[EMAIL PROTECTED] Behalf Of Hudson Dias Sent: 20 November 2008 22:35 To: delphi-br@yahoogrupos.com.br Subject: [delphi-br] Duvidas com SQL ola gente, estou fazendo uma consulta em uma tabela access: select * from EMITIDOS where (day(DTEMISSAO_CHEMITIDOS)= :dd and month (DTEMISSAO_CHEMITIDOS)= :mm and year(DTEMISSAO_CHEMITIDOS)= :aa)) or (day(DTCOMP_CHEMITIDOS)=:dd and month(DTCOMP_CHEMITIDOS)=:mm and year (DTCOMP_CHEMITIDOS)=:aa) or (day(DTVENC__CHEMITIDOS)=:dd and month (DTVENC__CHEMITIDOS)=:mm and year(DTVENC__CHEMITIDOS)=:aa) tbm tentei assim: (select * from EMITIDOS where day(DTEMISSAO_CHEMITIDOS)= :dd and month (DTEMISSAO_CHEMITIDOS)= :mm and year(DTEMISSAO_CHEMITIDOS)= :aa) union all (select * from EMITIDOS where day(DTCOMP_CHEMITIDOS)=:dd and month(DTCOMP_CHEMITIDOS)=:mm and year(DTCOMP_CHEMITIDOS)=:aa) union all (select * from EMITIDOS where day(DTVENC__CHEMITIDOS)=:dd and month(DTVENC__CHEMITIDOS)=:mm and year(DTVENC__CHEMITIDOS)=:aa) Ambas as formas esta me retornando somente a primeira data (DTEMISSAO_CHEMITIDOS). Gostaria que esta consulta tivesse o retorno dos 3 campos DTEMISSAO_CHEMITIDOS, DTCOMP_CHEMITIDOS e DTVENC__CHEMITIDOS para todos os resultados. Grato... -- FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM *** This e-mail and any files transmitted with it are confidential. If you are not the intended recipient, any reading, printing, storage, disclosure, copying or any other action taken in respect of this e-mail is prohibited and may be unlawful. If you are not the intended recipient, please notify the sender immediately by using the reply function and then permanently delete what you have received. Content of emails received by this Trust will be subject to disclosure under the Freedom of Information Act 2000, subject to the specified exemptions, including the Data Protection Act 1998 and Caldicott Guardian principles. This footnote also confirms that, unless otherwise stated, this email message has been swept by Sophos Anti-virus for the presence of computer viruses. ***