Ir para conteúdo
  • Cadastre-se

adilsonpazzini

Membros
  • Total de ítens

    892
  • Registro em

  • Última visita

  • Days Won

    3

Tudo que adilsonpazzini postou

  1. Legal , isso ja resolve meu problema . , pra vc ter uma base , to com EXEs em DELPHI e EXEs em Lazarus , e to convertendo aos poucos . mais como na parte de geracao de relatorios os componentes pra delphi e melhor , ainda vou usar eles um bom tempo . mais ai posso ir quebrando eles e ir passando aos poucos . Outra coisa Italo , nunca aconteceu por exemplo , de por algum problema da rede ou da maquina onde ficam os exes . a mesma nao conseguir se comunicar , e ai vc acabar abrindo um exe anterior a versao correta ? E se tiverem mais informacoes a complementar agradeço . Obrigado a todos . Adilson Pazzini .
  2. Posta o xml que ta dandoproblema , é mais facil pra achar o erro .
  3. esse problema é que realmente ainda nao foi liberado pra emissao , o meu demoro por causa do contador mesmo , depois ele conseguiu a liberacao do meu cliente pra emissao , ai deu tudo certo . Adilson PAZZINI
  4. obrigado pela ajuda , Italo , queria saber com vc , se essa versao que vc compara , é aquela que fica no proprio exe mesmo , q no caso no proprio delphi tem como versionar o exe , e tambem se vc utliza alguma tabela no banco pra comparacao , e por ultimo , seus modulos estao quebrados em EXE ou DLL . A conversa entre ele fica boa qndo esta local .. Desde ja agradeço . Adilson
  5. Entao . isso que eu estava pensando mesmo , mais como é feita a atualizacao nas estacoes , é manualmente , ou vc faz algum programa pra sincronizar as versões ? Agradeço sua opnião . Adilson Pazzini
  6. Boa , pessoal , to com uma duvida aqui , pois to migrando hj meu sistema em Delphi pra Lazarus , e hj estou utilizando uma pasta em um servidor pra ficar armazanados os EXEs do meu ERP , ai nas estacoes , so coloco o atalho do programa nos desktop , esse atalho no caso vem do compartilhamento que fica no servidor , queria saber se é assim que a maioria faz , ou se é armazado o exe em cada estacao mesmo , pois como to convertendo de Delphi pra lazarus , to quebrando meu sistema em varios EXE´s , ai fiz uma rotina pra chamar um exe a partir de outro , so que qndo , esta vindo o exe de outra estacao , essa chamada passa a ser lenta , por ta vindo pela rede , ai minha duvida seria : existe uma forma melhor pra ser feito isso , tipo poderia armazenar os exe´s nas estacoes mesmo , assim ficando mais rapido a chamada deles , e como eu faria com atualizacao de programa , pra nao acontecer de uma estacao deixar de ser atualizada ? quem puder me dar uma ideia , agradeço . Adilson .
  7. Elton , muito obrigado pela força , Vou estudar as alterações e posto aqui , quando eu concluir . mais uma vez , muito obrigado . Adilson Pazzini .
  8. Então Regys , na verdade , eu tava ate usando ele , por que o zlib compacta num formato proprio , e so da pra ser descompactado por ele mesmo , pelo menos a ultima vez q tentei utilizalo era assim , ref ao DelphiZip , vou ver se tem compatibilidade com o Lazarus , pois to tambem migrando meu sistema de Delphi pra lazarus ... mais valeuuuu Adilson .
  9. Fiz uma rotina pra compactar com o Winrar , porem funciona corretamente no Windows Sevem mais não funciona no Windows XP , pelo que vi , quando ta no windows XP , Ele não reconhece o diretorio como "Arquivos de programas" e sim como "arquiv~1" , por isso acaba nao funcionando corretamente no XP , se alguem tiver alguma sujestao agradeço . Pelo XP . se eu fizer o teste em Diretorios com ate 8 digitos . fuciona direito , mais ao fazer em diretorios com mais de 8 digitos ai ja da erro . se alguem puder ajudar agradesço . Adilson Pazzini. ************************** FUNCAO PRA PEGAR OS DIRETORIOS ARQUIVOS DE PROGRAMAS E DESKTOP ************************** type TSystemPath = (Desktop, StartMenu, Programs, Startup, Personal, AppData, Fonts, SendTo, Recent, Favorites, Cache, Cookies, History, NetHood, PrintHood, Templates, LocADat, WindRoot, WindSys, TempPath, RootDir, ProgFiles, ComFiles, ConfigPath, DevicePath, MediaPath, WallPaper); var livm02: Tlivm02; implementation uses UDMNFE, MODULO, ufrmStatus; {$R *.dfm} function GetSystemPath(SystemPath: TSystemPath): string; var ph: PChar; begin with TRegistry.Create do try RootKey := HKEY_CURRENT_USER; OpenKey('\Software\Microsoft\Windows\CurrentVersion\' + 'Explorer\Shell Folders', True); case SystemPath of Desktop: Result := ReadString('Desktop'); StartMenu: Result := ReadString('Start Menu'); Programs: Result := ReadString('Programs'); Startup: Result := ReadString('Startup'); Personal: Result := ReadString('Personal'); AppData: Result := ReadString('AppData'); Fonts: Result := ReadString('Fonts'); SendTo: Result := ReadString('SendTo'); Recent: Result := ReadString('Recent'); Favorites: Result := ReadString('Favorites'); Cache: Result := ReadString('Cache'); Cookies: Result := ReadString('Cookies'); History: Result := ReadString('History'); NetHood: Result := ReadString('NetHood'); PrintHood: Result := ReadString('PrintHood'); Templates: Result := ReadString('Templates'); LocADat: Result := ReadString('Local AppData'); WindRoot: begin GetMem(ph, 255); GetWindowsDirectory(ph, 254); Result := Strpas(ph); Freemem(ph); end; WindSys: begin GetMem(ph, 255); GetSystemDirectory(ph, 254); Result := Strpas(ph); Freemem(ph); end; TempPath: begin GetMem(ph, 255); GetTempPath(254, ph); Result := Strpas(ph); Freemem(ph); end; RootDir: begin GetMem(ph, 255); GetSystemDirectory(ph, 254); Result := (Copy(Strpas(ph), 1, 2)); Freemem(ph); end; end; RootKey := HKEY_LOCAL_MACHINE; OpenKey('\SOFTWARE\Microsoft\Windows\CurrentVersion', True); case SystemPath of ProgFiles: Result := ReadString('ProgramFilesDir'); ComFiles: Result := ReadString('CommonFilesDir'); ConfigPath: Result := ReadString('ConfigPath'); DevicePath: Result := ReadString('DevicePath'); MediaPath: Result := ReadString('MediaPath'); WallPaper: Result := ReadString('WallPaperDir'); end; finally CloseKey; Free; end; if (Result <> '') and (Result[Length(Result)] <> '\') then Result := Result + '\'; end; ************************* FUNCAO PRA EXCUÇÃO DO COMANDO *********************** function CreateProcessSimple_novo(cmd: string;esconde:boolean=true): boolean; var SUInfo: TStartupInfo; ProcInfo: TProcessInformation; begin FillChar(SUInfo, SizeOf(SUInfo), #0); SUInfo.cb := SizeOf(SUInfo); SUInfo.dwFlags := STARTF_USESHOWWINDOW; SUInfo.wShowWindow := iif(ESCONDE,SW_HIDE,SW_SHOWNORMAL); Result := CreateProcess(nil, PChar(cmd), nil, nil, false, CREATE_NEW_CONSOLE or NORMAL_PRIORITY_CLASS, nil, nil, SUInfo, ProcInfo); if (Result) then begin WaitForSingleObject(ProcInfo.hProcess, INFINITE); CloseHandle(ProcInfo.hProcess); CloseHandle(ProcInfo.hThread); end; end; *********************************** FUNCAO PRA GERAR O ARQUIVO WINRAR *************************************** procedure COMPACTA_WINRAR(NOMEDIR:String); Var cmd, Arquivos , Destino : String; i: Integer; begin if not FileExists(IncludeTrailingPathDelimiter(GetSystemPath(ProgFiles))+'winrar\winrar.exe') then begin MSGI('Arquivo ['+IncludeTrailingPathDelimiter(GetSystemPath(ProgFiles))+'winrar\winrar.exe] não Encontrado !!!'); Abort; end; Arquivos := IncludeTrailingPathDelimiter(NOMEDIR)+'*.xml'; Destino := IncludeTrailingPathDelimiter(NOMEDIR)+'xmlnfe.rar'; Cmd := IncludeTrailingPathDelimiter(GetSystemPath(ProgFiles))+'winrar\winrar.exe' + ' a "' + Destino + '"' + ' ' + Arquivos; livm02.listbox1.Items.Add(cmd); CreateProcessSimple_novo(CMD,false); if not FileExists(Destino) then Msgi('Arquivo ['+Destino+'] não Gerado !!!'); // WinExec( PAnsiChar(AnsiString(Cmd)), SW_HIDE); end; //********************* AGORA A FUNCAO PARA COMPACTAR OS ARQUIVOS ************************************************** begin Caminho := GetSystemPath(Desktop); //===> PEGANDO O DESKTOP como Padrao ... if SelectDirectory(CAMINHO, [sdAllowCreate, sdPerformCreate, sdPrompt],1000) then CAMINHO := IncludeTrailingPathDelimiter(CAMINHO) + CODEMP.text +'_'+ textotonum(DTI.TEXT)+'_'+ textotonum(DTF.TEXT); if not DirectoryExists(CAMINHO) then begin CreateDir(CAMINHO); end; GerarArquivosParaCompactacao; //==> funcao que envia arquivos XML pra dentro da pasta acima . pra logo abaixo ser compactada pelo winrar . COMPACTA_WINRAR(CAMINHO); //==> funcao pra compactar pelo Winrar ... end; Adilson Pazzini .
  10. unit usisException; interface uses Forms, SysUtils , Messages , Classes , Dialogs , Controls , DB, DBTables; type TSISHandleException = class private FLogFile: string; procedure AppException(Sender:TObject; E:Exception); public constructor Create; end; implementation uses MODULO; {Exception} procedure TSISHandleException.AppException(Sender:TObject; E:Exception); var Log: TextFile; ErrCode,i,x,y :integer; AConected :boolean; ASource: TComponent; Formulario :TForm; IdentificadorQuery:tstringlist ; IdentificadorForm:tstringlist ; begin {$I-} try IdentificadorQuery := TStringList.Create; identificadorQuery.Clear ; IdentificadorForm := TStringList.Create; identificadorForm.Clear ; AssignFile(Log, FLogFile); if FileExists(FLogFile) then Append(Log) else Rewrite(Log); try WriteLn(Log, 'Exception ocorrida em '+ FormatDateTime('dd" de "mmmm" de "yyyy" às "hh:nn:ss', Now)); WriteLn(Log,'-------------------------------------------------------------------'); if TComponent(sender) is TForm then begin WriteLn(Log,'Form.................: '+ TForm(sender).Name); WriteLn(Log,'Caption do Form......: '+TForm(sender).Caption); end else begin WriteLn(Log,'Form.................: '+TForm(TComponent(sender).Owner).Name); WriteLn(Log,'Caption do Form......: '+TForm(TComponent(sender).Owner).Caption); end; WriteLn(Log,'-------------------------------------------------------------------'); WriteLn(Log,'Classe da Exception..: '+E.ClassName); WriteLn(Log,'Mensagem da Exception: '+E.Message); if E is EDBEngineError then WriteLn(Log,'Erro : '+inttostr((E as EDBEngineError).Errors[0].ErrorCode)); WriteLn(Log,''); // ShowMessage(E.Message); finally CloseFile(Log); end; //===== TRATAMENTO if TComponent(sender) is TForm then //---Pegar ... MENU01.Active Formulario := TForm(sender) else Formulario := TForm(TComponent(sender).Owner) ; AConected := false; if E is EDBEngineError then begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if ErrCode = 13059 then // --> 'Erro não Foi possivel Conectar com o Host' begin while not AConected do begin try //===> reconectando ............ for x := 0 to DM.DATABASE.DataSetCount-1 do begin //ShowMessage(dm.DATABASE.DataSets[x].Owner.Name+'.'+dm.DATABASE.DataSets[x].Name); identificadorQuery.Add(dm.DATABASE.DataSets[x].Name); identificadorForm.Add(dm.DATABASE.DataSets[x].Owner.Name); end; DM.DATABASE.Connected := false ; DM.DATABASE.Connected := true ; AConected := true; for i := 0 to Application.ComponentCount-1 do if (Application.Components[i] is TForm) then begin //ShowMessage(TForm(Application.Components[i]).Name); for y := 0 to TForm(Application.Components[i]).ComponentCount-1 do if TForm(Application.Components[i]).Components[y] is TQuery then //ShowMessage(TForm(Application.Components[i]).Components[y].Name); for x := 0 to identificadorQuery.Count-1 do if (TForm(Application.Components[i]).Components[y].Name = identificadorQuery[x]) and (TForm(Application.Components[i]).Components[y].Owner.Name = identificadorForm[x]) then //ShowMessage(identificadorForm[x]+'.'+identificadorQuery[x]); begin //ShowMessage(TForm(Application.Components[i]).Components[y].Owner.Name+'.'+TForm(Application.Components[i]).Components[y].Name); TQuery(TForm(Application.Components[i]).Components[y]).Open; end; end//se existe formulario ... else if (Application.Components[i] is TDataModule) then begin //ShowMessage(TDataModule(Application.Components[i]).Name); for y := 0 to TDataModule(Application.Components[i]).ComponentCount-1 do if TDataModule(Application.Components[i]).Components[y] is TQuery then //ShowMessage(TDataModule(Application.Components[i]).Components[y].Name); for x := 0 to identificadorQuery.Count-1 do if (TDataModule(Application.Components[i]).Components[y].Name = identificadorQuery[x]) and (TDataModule(Application.Components[i]).Components[y].Owner.Name = identificadorForm[x]) then //ShowMessage(identificadorForm[x]+'.'+identificadorQuery[x]); begin //ShowMessage(TDataModule(Application.Components[i]).Components[y].Owner.Name+'.'+TDataModule(Application.Components[i]).Components[y].Name); TQuery(TDataModule(Application.Components[i]).Components[y]).Open; end; end;//se existe formulario ... except On E: Exception do begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if MessageDlg('Cód.Erro :'+inttostr(ErrCode)+' Formulário :'+Formulario.name+' Mensagem: '+E.Message+#13+#10+ 'Deseja tentar se Re-conectar novamente ao Banco de Dados ?', mtConfirmation, [mbYes,MbNo], 0) = mrNo then begin Break; end; end; end; end;// while ;;;; if AConected = false then Application.Terminate; end; end; finally identificadorquery.Free ; identificadorform.Free; end; {$I+} end; constructor TSISHandleException.Create; begin Application.OnException := AppException; FLogFile := ChangeFileExt(Paramstr(0),'_erro_bd.log'); end; var SISExcetion: TSISHandleException; initialization SISExcetion := TSISHandleException.Create; finalization SISExcetion.Free; end. To usando assim , agora . e ta ate funcionando pra BDE por enquanto ... Como to passando pra ZEOS vou so ver qual a mensagem q aparece la pra trocar ai ..
  11. Se nao me engano , Sao Paulo , não é padrão abrasf , o componente só aceita o padrao abrasf .
  12. OLha . eu cheguei a testar os dois , o unico inconveniente que achei mesmo no SQLdb Foi de ter que apos comitar a transacao , é ter que reconstruir as querys novamente , fora isso , tambem , nao tive problemas , ref a acentuação , vc tem que ajustar o codigo de pagina , pois lembre-se de que o lazarus é unicod , por isso vem os caracteres estranhos . Mais por costume mesmo e compatibilidade com o DELPHI7 , to usando o zeos .. e tambem nao tenho nada pra reclamar . Adilson
  13. Eu ja esotu utilizando ZEOS 703 para Lazarus , so tenho ainda alguns problemas devido esta ainda utilizando o dialeto 1 , mais fora isso to trabalando com ele normalmente , e tambem uma diferença que vi entre o SQLDB e o ZEOS no lazaarus é que ao comitar uma transacao , a mesma no SQLDb fecha todas os datasets abertos , ja no ZEOS isso nao acontece ... Adilson .
  14. ok . Enviei pra eles . vamos ver se eles respondem . pelo que vi parece nao ter ainda pra itape , mais vou confirmar com eles . Obrigado Italo , acho q pelo menos o arquivo vou conseguir gerar integracao pro site pelo menos . Agradeço ., Adilson PAzzini
  15. Itallo . Bom dia . tem como incluir a Cidade : UF: SP , Cod.Município: 3522307 , Município: ITAPETININGA para o Provedor GovDigital , pra iniciar os testes pra esta cidade .. Desde ja agradeço Adilson Pazzini .
  16. Acabei de atualizar o componente e fazer os teste pra cidade de Capão Bonito provedor 4R . inclusive , se puder incluir la no DEMO no combo a cidade Capão Bonito/3510203/SP , mais nao ta dando certo , pelo demo informei os dados da empresa , a pasta schemas C:\Program Files\Borland\Delphi7\acbr\Exemplos\ACBrNFSe\Delphi\Schemas\4R ai tentei utilizar a opcao Gerar e Enviar Lote e tambem a Gerar e Envar NFSe , ambas deram problemas , vou postar o print de tela abaixo , caso ajude . Site Hj utilizado pra transcrever as NFSe de Capao https://capaobonito.sistemas4r.com.br/principal.aspx Adilson Pazzini .
  17. Fiz mais uma alteração , caso alguem tenha algo a sugerir agradeco. Adilson . procedure TSISHandleException.AppException(Sender:TObject; E:Exception); var Log: TextFile; ErrCode,i,x,y :integer; AConected :boolean; ASource: TComponent; Formulario :TForm; IdentificadorQuery:tstringlist ; IdentificadorForm:tstringlist ; begin {$I-} try IdentificadorQuery := TStringList.Create; identificadorQuery.Clear ; IdentificadorForm := TStringList.Create; identificadorForm.Clear ; if TComponent(sender) is TForm then //---Pegar ... MENU01.Active Formulario := TForm(sender) else Formulario := TForm(TComponent(sender).Owner) ; AConected := false; if E is EDBEngineError then begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if ErrCode = 13059 then // --> 'Erro não Foi possivel Conectar com o Host' begin while not AConected do begin try //===> reconectando ............ for x := 0 to DM.DATABASE.DataSetCount-1 do begin identificadorQuery.Add(dm.DATABASE.DataSets[x].Name); identificadorForm.Add(dm.DATABASE.DataSets[x].Owner.Name); end; DM.DATABASE.Connected := false ; DM.DATABASE.Connected := true ; AConected := true; for i := 0 to Application.ComponentCount-1 do if (Application.Components[i] is TForm) then begin for y := 0 to TForm(Application.Components[i]).ComponentCount-1 do if TForm(Application.Components[i]).Components[y] is TQuery then for x := 0 to identificadorQuery.Count-1 do if (TForm(Application.Components[i]).Components[y].Name = identificadorQuery[x]) and (TForm(Application.Components[i]).Components[y].Owner.Name = identificadorForm[x]) then TQuery(TForm(Application.Components[i]).Components[y]).Open; end else if (Application.Components[i] is TDataModule) then begin for y := 0 to TDataModule(Application.Components[i]).ComponentCount-1 do if TDataModule(Application.Components[i]).Components[y] is TQuery then for x := 0 to identificadorQuery.Count-1 do if (TDataModule(Application.Components[i]).Components[y].Name = identificadorQuery[x]) and (TDataModule(Application.Components[i]).Components[y].Owner.Name = identificadorForm[x]) then //ShowMessage(identificadorForm[x] +'.'+identificadorQuery[x]); TQuery(TDataModule(Application.Components[i]).Components[y]).Open; end; except On E: Exception do begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if MessageDlg('Cód.Erro :'+inttostr(ErrCode)+' Formulário :'+Formulario.name+' Mensagem: '+E.Message+#13+#10+ 'Deseja tentar se Re-conectar novamente ao Banco de Dados ?', mtConfirmation, [mbYes,MbNo], 0) = mrNo then begin Break; end; end; end; end;// while ;;;; if AConected = false then Application.Terminate; end; end; finally identificadorquery.Free ; identificadorform.Free; end; {$I+} end;
  18. Fiz assim . agora deu certo . ainda nao tive problemas . caso alguem tenha algo a sugerir agradeco. procedure TSISHandleException.AppException(Sender:TObject; E:Exception); var Log: TextFile; ErrCode,i,x,y :integer; AConected :boolean; ASource: TComponent; Formulario :TForm; IdentificadorQuery:tstringlist ; IdentificadorForm:tstringlist ; begin {$I-} try IdentificadorQuery := TStringList.Create; identificadorQuery.Clear ; IdentificadorForm := TStringList.Create; identificadorForm.Clear ; if TComponent(sender) is TForm then //---Pegar ... MENU01.Active Formulario := TForm(sender) else Formulario := TForm(TComponent(sender).Owner) ; AConected := false; if E is EDBEngineError then begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if ErrCode = 13059 then // --> 'Erro não Foi possivel Conectar com o Host' begin while not AConected do begin try //===> reconectando ............ for x := 0 to DM.DATABASE.DataSetCount-1 do begin ShowMessage(dm.DATABASE.DataSets[x].Name+' pai'+dm.DATABASE.DataSets[x].Owner.Name); identificadorQuery.Add(dm.DATABASE.DataSets[x].Name); identificadorForm.Add(dm.DATABASE.DataSets[x].Owner.Name); end; DM.DATABASE.Connected := false ; DM.DATABASE.Connected := true ; AConected := true; for i := 0 to Application.ComponentCount-1 do if Application.Components[i] is TForm then for y := 0 to TForm(Application.Components[i]).ComponentCount-1 do if TForm(Application.Components[i]).Components[y] is TQuery then //ShowMessage(TForm(Application.Components[i]).Components[y].Name); for x := 0 to identificadorQuery.Count-1 do if (TForm(Application.Components[i]).Components[y].Name = identificadorQuery[x]) and (TForm(Application.Components[i]).Components[y].Owner.Name = identificadorForm[x]) then //ShowMessage(identificadorForm[x]+'.'+identificadorQuery[x]); TQuery(TForm(Application.Components[i]).Components[y]).Open; except On E: Exception do begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if MessageDlg('Cód.Erro :'+inttostr(ErrCode)+' Formulário :'+Formulario.name+' Mensagem: '+E.Message+#13+#10+ 'Deseja tentar se Re-conectar novamente ao Banco de Dados ?', mtConfirmation, [mbYes,MbNo], 0) = mrNo then begin Break; end; end; end; end;// while ;;;; if AConected = false then Application.Terminate; end; end; finally identificadorquery.Free ; identificadorform.Free; end; {$I+} end;
  19. Daniel agradeco sua ajuda . É fazer o seguinte ... qndo cair a conexao . o sistema detectar a queda e tentar fazer novamente a reconeccao e em caso de sucesso . reconstruir as querys . pra que o usuario nao precise ter que sair do aplicativo e entrar novamente ... Adilson Pazzini .
  20. Seguinte pessoal , queria saber se tem alguma forma de eu capiturar Query que estavam Ativas , mais devido a Queda de Conexao do DATABASE Central , ele passou a ficar com o Status Active = false , pois to tentando fazer uma Unit que qndo der o erro de queda de conexao . o mesmo tente reconectar e reconstruir as querys que estavam abertas ... estou com um codigo que to criando pra Delphi7 e depois vou portar pra lazarus , mais que ainda . nao to conseguindo saber qual é query q estava ativa antes da queda ... vou postar o codigo e quem puder me ajudar agradeço . Adilson Pazzini procedure TSISHandleException.AppException(Sender:TObject; E:Exception); var Log: TextFile; ErrCode,i :integer; AConected :boolean; ASource: TComponent; Formulario :TForm; begin {$I-} //===== TRATAMENTO if TComponent(sender) is TForm then Formulario := TForm(sender) else Formulario := TForm(TComponent(sender).Owner) ; AConected := false; if E is EDBEngineError then begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if ErrCode = 13059 then // --> 'Erro não Foi possivel Conectar com o Host' // erro do proprio BDE. begin while not AConected do begin try //===> reconectando ............aq ainda utilizando o BDE ... mais estarei migrando para ZEOS tambem DM.DATABASE.Connected := false ; DM.DATABASE.Connected := true ; AConected := true; for i := 0 to Formulario.ComponentCount-1 do begin ASource := Formulario.Components[i]; if ASource <> nil then begin if ASource is Tquery then begin //ShowMessage('Formulario '+Formulario.name+' Query Name '+TQuery(ASource).name+' Active='+iif(TQuery(ASource).Active,'true','false')); if not TQuery(ASource).Active then TQuery(ASource).open; end; end; end; except On E: Exception do begin ErrCode := (E as EDBEngineError).Errors[0].ErrorCode; if MessageDlg('Cód.Erro :'+inttostr(ErrCode)+' Formulário :'+Formulario.name+' Mensagem: '+E.Message+#13+#10+ 'Deseja tentar se Re-conectar novamente ao Banco de Dados ?', mtConfirmation, [mbYes,MbNo], 0) = mrNo then begin Break; end; end; end; end; if AConected = false then Application.Terminate; end; end; {$I+} end;
  21. Beleza Joao .. vou ver se inicio os testes amanhã . OK Obrigado .
  22. Valeu Italo . vou fazer os testes e posto aqui . obrigadoooo .
  23. Italo , tem como vc incluir a Cidade de Capão Bonito - SP Ibge = 3510203 , para o provedor 4R , pra eu poder fazer os testes . Desde ja agradeco . Adilson .
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.