Jump to content
Sandro Lemes

Consulta CEP, entre outros serviços, diretamente no webService dos Correios

Recommended Posts

Bom dia Galera!

 

Ha poucos dias descobri uma maneira nativa e sem precisar de instalar DLLs, componentes infinitos(Deus me livre)... e achei interessante postar (Estou em processo de mudança mental e compartilhar coisas difíceis é um começo! rsss)!

 

Então...vamos lá! Segue abaixo uma maneira nativa e fácil de consultar CEPS nos correios! Espero que gostem!

 

 

 

New >> Other.... Aba WebServices... WSDL Importer... e importe a seguinte URL:
https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente?wsdl

Na unit importada, substitua a linha :
InvRegistry.RegisterInvokeOptions(TypeInfo(AtendeCliente), ioDocument);

por:
InvRegistry.RegisterInvokeOptions(TypeInfo(AtendeCliente), ioHasAllSOAPActions);
ou
InvRegistry.RegisterInvokeOptions(TypeInfo(AtendeCliente), ioHasNamespace);

Último detalhe, no indy passado setar a seguinte propriedade como True:
HTTPRIO1.HTTPWebNode.UseUTF8InHeader := True;


Pronto! Está apto a fazer consultas diretas no site da Empresa Brasileira de Correios e Telégrafos;


Exemplo:


procedure TfrmIni.btnConsCepClick(Sender: TObject);
var
wsAtendeCliente: AtendeCliente;
wsConsultaCepReq: consultaCEP;
wsConsultaCepResp: consultaCEPResponse;
sEndCep: string;

begin
// InvRegistry.RegisterInvokeOptions(TypeInfo(YourSoapInterface), ioDocument);
// CHANGE TO
// InvRegistry.RegisterInvokeOptions(TypeInfo(YourSoapInterface), ioHasAllSOAPActions); ((( TESTADO OK COM ESSE )))
// OR
// InvRegistry.RegisterInvokeOptions(TypeInfo(YourSoapInterface), ioHasNamespace);

try
try
wsConsultaCepReq := consultaCEP.Create;
wsConsultaCepResp := consultaCEPResponse.Create;

HTTPRIO1.HTTPWebNode.UseUTF8InHeader := True;
wsAtendeCliente := GetAtendeCliente(False, '', HTTPRIO1);

wsConsultaCepReq.cep := edtCep.Text;

try
wsConsultaCepResp := wsAtendeCliente.consultaCEP( wsConsultaCepReq );
except
on E: ERemotableException do
begin
if (UpperCase(Trim(E.message)) = 'CEP NAO ENCONTRADO') or (UpperCase(Trim(E.message)) = 'CEP NAO INFORMADO') then
begin
Application.MessageBox(PChar(Format('Atenção! Cep %s não informado/encontrado!', [edtCep.Text])), PChar('Mensagem'), MB_OK + MB_ICONINFORMATION);
Exit;
end
else
begin
raise Exception.Create( E.message );
end;
end;
end;

sEndCep := wsConsultaCepResp.return.cep + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.end_ + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.complemento + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.complemento2 + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.bairro + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.cidade + #13;
sEndCep := sEndCep + wsConsultaCepResp.return.uf + #13;

ShowMessage( sEndCep );
finally
FreeAndNil(wsConsultaCepReq);
FreeAndNil(wsConsultaCepResp);
wsAtendeCliente._Release;
end

except
on E: Exception do
begin
Application.MessageBox(PChar(Format('Atenção! %s%s ', [#13#13, E.message])), PChar('Erro'), MB_OK + MB_ICONERROR);
end;
end;
end;



Att.

Sandro Lemes
Desenvolvedor Delphi;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By jjunior100
      Preciso armazenar o total das páginas de um determinado documento em uma variável no delphi. Sei como inserir a informação no modelo MSWord.Selection.Fields.Add( Range:=MSWord.Selection.Range, Type:=wdFieldEmpty, Text:= 'NUMPAGES * Arabic ', PreserveFormatting:=True);
      mas como armazenar essa informação em uma variável tipo integer? Obrigado
    • By Hacker_Buiu
      Delphi está na área errada,não deveria ser numa área desktop,ao contrário de web?
    • By janir.matheus
      Bom dia,
       
      Preciso de ajuda ajuda para resolver o problema de SIGSEGV, basicamente tennho um zconection dentro de uma classe e recebo erro quando tento acessá-lo. Segue um trecho da classe:
      unit unt_classconexao; {$mode objfpc}{$H+} interface uses Classes, SysUtils, ZConnection, ZDataset; type { tConexao } tConexao = class private public vConector : TZConnection; function Listar_Usuarios:TZReadOnlyQuery; procedure Conectar_Banco; end; implementation { tConexao } function tConexao.Listar_Usuarios: TZReadOnlyQuery; var zrquery : TZReadOnlyQuery; begin Conectar_Banco; try zrquery := TZReadOnlyQuery.Create(nil); zrquery.Connection := vConector; zrquery.SQL.Clear; zrquery.SQL.Text := 'SELECT * from tbl_profissionais'; zrquery.Open; Listar_Usuarios := zrquery; finally end; end; procedure tConexao.Conectar_Banco; begin //vConector := TZConnection.Create(nil); vConector.HostName := 'localhost'; vConector.Port := 3306; vConector.Database := 'Caps'; vConector.Protocol := 'mysql-5'; vConector.User := 'root'; vConector.Password := ''; vConector.Connected := true; end; end. Após isso tento fazer uso dessa classe para popular um DBGrid:
      unit unt_frmprincipal; {$mode objfpc}{$H+} interface uses Classes, SysUtils, DB, Forms, Controls, Graphics, Dialogs, Menus, DBGrids, ZConnection, unt_classconexao; type { Tfrm_principal } Tfrm_principal = class(TForm) DataSource1: TDataSource; DBGrid1: TDBGrid; MainMenu_frmPrincipal: TMainMenu; MenuItem_AplicativoSair: TMenuItem; N1: TMenuItem; MenuItem_AplicativoLogin: TMenuItem; MenuItem_Aplicativo: TMenuItem; procedure MenuItem_AplicativoLoginClick(Sender: TObject); private public vConexao : tConexao; end; var frm_principal: Tfrm_principal; implementation {$R *.lfm} { Tfrm_principal } procedure Tfrm_principal.MenuItem_AplicativoLoginClick(Sender: TObject); begin //vConexao := tConexao.Create; DataSource1.DataSet := vConexao.Listar_Usuarios; end; end. A mensagem de erro que recebo dá a entender que o problema ocorre logo que o zconnection começa a ser configurado, como vocês podem ver pelos trechos comentados eu tentei instanciar o componente também sem sucesso. Não tenho experiencia com POO e tenho certeza que estou cometendo um erro bobo, então peço uma explicação sobre como resolver isso. Agradeço de antemão a quem puder me ajudar.
       
      PS. Estou usando o Lazarus.
    • By Jozimar
      om dia!
       
      Durante a criação de um menu em tempo de execução com um tema aplicado, a descrição do CAPTION das Action estão ficando desconfigurados.
      O erro ocorre apenas quando os menus são criados em tempo de execução, conforme imagem abaixo:
       
      Imagem com o erro.
       
      Abaixo código fonte do executável.
      ----------------------------------------------------------------------------------------------- unit UFormPrincipal; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Actions, Vcl.ActnList, Vcl.Menus, System.ImageList, Vcl.ImgList, cxImageList, cxGraphics, UdmLista, Vcl.ComCtrls, Vcl.ToolWin; type TFormPrincipal = class(TForm) btnAplicar: TButton; btnCarregarTema: TButton; btnCriarMenus: TButton; pgnModulos: TPageControl; ToolBarOne: TToolBar; procedure btnAplicarClick(Sender: TObject); procedure btnCarregarTemaClick(Sender: TObject); procedure FormCreate(Sender: TObject); procedure btnCriarMenusClick(Sender: TObject); private { Private declarations } FModuloLista: TdmLista; public { Public declarations } end; var FormPrincipal: TFormPrincipal; implementation Uses Vcl.Styles, Vcl.Themes; {$R *.dfm} procedure TFormPrincipal.btnAplicarClick(Sender: TObject); begin if btnAplicar.Caption = 'Aplicar CARBON' then begin btnAplicar.Caption := 'Aplicar WINDOWS'; TStyleManager.TrySetStyle('Carbon'); end else begin btnAplicar.Caption := 'Aplicar CARBON'; TStyleManager.TrySetStyle('Windows'); end; end; procedure TFormPrincipal.btnCarregarTemaClick(Sender: TObject); begin TStyleManager.LoadFromFile('C:\TST\Tema\Carbon.vsf'); end; procedure TFormPrincipal.btnCriarMenusClick(Sender: TObject); var lMenu: TMainMenu; lItem: TMenuItem; lIndex: iNTEGER; TabSheet: TTabSheet; begin TabSheet := TTabSheet.Create(pgnModulos); TabSheet.PageControl := pgnModulos; TabSheet.Caption := ' - Menu - '; ToolBarOne.Parent := TabSheet; lMenu := TMainMenu.Create(ToolBarOne); lMenu.Images := FModuloLista.ImageList1; lItem := TMenuItem.Create(lMenu); lItem.Caption := ' -- SubMenu -- '; lMenu.Items.Add(lItem); for lIndex := 0 to FModuloLista.ActionList1.ActionCount-1 do begin lItem := TMenuItem.Create(lMenu); lItem.Action := FModuloLista.ActionList1[lIndex]; lMenu.Items[0].Add(lItem); end; ToolBarOne.Menu := lMenu; end; procedure TFormPrincipal.FormCreate(Sender: TObject); begin FModuloLista := TdmLista.Create(Self); end; end. ----------------------------------------------------------------------------------------------- object FormPrincipal: TFormPrincipal Left = 0 Top = 0 Caption = 'Principal' ClientHeight = 428 ClientWidth = 773 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object btnAplicar: TButton Left = 296 Top = 273 Width = 241 Height = 25 Caption = 'Aplicar CARBON' TabOrder = 0 OnClick = btnAplicarClick end object btnCarregarTema: TButton Left = 177 Top = 273 Width = 113 Height = 25 Caption = 'Carregar Tema' TabOrder = 1 OnClick = btnCarregarTemaClick end object btnCriarMenus: TButton Left = 96 Top = 273 Width = 75 Height = 25 Caption = 'Criar MENU' TabOrder = 2 OnClick = btnCriarMenusClick end object pgnModulos: TPageControl Left = 0 Top = 0 Width = 773 Height = 97 Align = alTop TabOrder = 3 end object ToolBarOne: TToolBar Left = 0 Top = 97 Width = 773 Height = 29 Caption = 'ToolBarOne' TabOrder = 4 Transparent = False StyleElements = [] Wrapable = False end end ----------------------------------------------------------------------------------------------- unit UdmLista; interface uses System.SysUtils, System.Classes, System.ImageList, Vcl.ImgList, Vcl.Controls, cxImageList, cxGraphics, System.Actions, Vcl.ActnList, Vcl.Menus; type TdmLista = class(TDataModule) ActionList1: TActionList; Action1: TAction; Action2: TAction; Action3: TAction; Action4: TAction; ImageList1: TImageList; MainMenuOne: TMainMenu; Novidades1: TMenuItem; Action11: TMenuItem; Action21: TMenuItem; Action31: TMenuItem; Action41: TMenuItem; procedure Action1Execute(Sender: TObject); procedure Action2Execute(Sender: TObject); procedure Action3Execute(Sender: TObject); procedure Action4Execute(Sender: TObject); private { Private declarations } public { Public declarations } end; var dmLista: TdmLista; implementation Uses Vcl.Dialogs; {%CLASSGROUP 'Vcl.Controls.TControl'} {$R *.dfm} procedure TdmLista.Action1Execute(Sender: TObject); begin ShowMessage('1111'); end; procedure TdmLista.Action2Execute(Sender: TObject); begin ShowMessage('2222'); end; procedure TdmLista.Action3Execute(Sender: TObject); begin ShowMessage('3333'); end; procedure TdmLista.Action4Execute(Sender: TObject); begin ShowMessage('4444'); end; end. ----------------------------------------------------------------------------------------------- object dmLista: TdmLista OldCreateOrder = False Height = 240 Width = 442 object ActionList1: TActionList Images = ImageList1 Left = 248 Top = 72 object Action1: TAction Category = 'Dados Unidos' Caption = 'Action1' ImageIndex = 0 OnExecute = Action1Execute end object Action2: TAction Category = 'Dados Unidos' Caption = 'Action2' ImageIndex = 1 OnExecute = Action2Execute end object Action3: TAction Category = 'Dados Unidos' Caption = 'Action3' ImageIndex = 2 OnExecute = Action3Execute end object Action4: TAction Category = 'Dados Unidos' Caption = 'Action4' ImageIndex = 3 OnExecute = Action4Execute end end object ImageList1: TImageList Left = 176 Top = 72 Bitmap = { 494C010104000800040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000002000000001002000000000000020 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000010102021C1C384520225E791C2265801F2767801C1F607D23244D600B0B 1216000000000000000000000000000000000000000000000000000000000000 00000000000005070B0E5E84BCEA5077B0FF315187FF1A3A65FE02080E2E0000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000010103050E170102070B000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000001010 1B204546A8D64659D8FF7294F5FF83A8FFFF82A7FEFF7B9FFAFF556EE2FF3D43 BAEB1F1F35400000000000000000000000000000000000000000000000000000 00000000000000000000000000005581B8FF325488FF1A3A65FF030B14440000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000407151F15265E8B0C132637000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000001E1E39463E48 B8E05C78EFFF6989F8FF617EF1FF566DE6FF5368E2FF5D78EDFF6989F8FF6381 F4FF4858D7FC282A657F00000000000000000000000000000000000000000000 0000000000000000000000000000426693D334588CFF1A3A65FF030A133D0000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000010103050C111B2D7EA53551CEFA1C2C668B0A1124340102 0508000000000000000000000000000000000000000000000000000000000000 0000000000000B1F0E4118411F8A000000000000000000000000000000000000 000000000000000000000000000000000000000000000E0E171C3337BEF9536B F0FF556EF2FF4458E2FF2F2FB1F631315B6F2525414E3F3F8BB2343BC5FC5069 EEFF5670F4FF4250D6FC1B1B2E37000000000000000000000000000000000000 00000000000000000000000000002E486897365D90FF1A3861F50716287B0815 267003090F2B0000000000000000000000000000000000000000000000000000 000000000101060A172215237EBA405FECFF5578FFFF314AC2EF20325F800E17 2F43010104070000000000000000000000000000000000000000000000000000 000000000000409A5BFF2F803BFF000000000000000000000000000000000000 000000000000000000000000000000000000000000002729718E4051E8FF5D75 F2FF576EF1FF4356ECFF3942D1FA1F20536B00000000000000001515252D3136 97BC4357EAFF4458ECFF353AB9EC0C0C14180000000000000000000000000000 00000000000008101B3C1629469E42699CF3385F93FF244473FF2B4C7FFF3151 86FF35558BFE2336579200000000000000000000000000000000000000000406 0E150E17416021359CCA3C5CEAFF4768F9FF5174F8FF587CF5FF3852C9F32032 7CAA1622435C080D1C280101020400000000000000000000000000000000091D 0B403E9D5EFF70D1A3FF2F803BFF000000000000000000000000000000000000 000000000000000000000000000000000000000000003A3FBAE03A49EEFF3E4D DFFF556BE6FF4556EFFF3A4AEDFF2D34D0FE2B2B4D5D00000000000000001515 252D2C31C5FC3A4AECFF2D37D9FF23234D600000000000000000000000000000 000018284278385991FC3D5E99FF4C75AFFF386295FF243D64C219253B551821 354B344975A15374B9F9080B111700000000000000000000000002030A10131F 6DA02B44D2FF4162F2FF3C5BF3FF3856F1FF3A58F1FF4A6CF4FF5C80F6FF4565 E3FF1B2E9DDF1A2A597E0910273B010104060000000000000000000000003B9C 5BFF6DD4A6FF77D6ABFF2F803BFF358543FF3B8A4BFF409053FF46955AFF4C9A 61FF509E67FF55A16CFF58A471FF00000000000000002E35D8FC2E39EBFF3035 BBE12C2E82A23B48E1FF303AEAFF2C36E8FF282DD3FE21235A6E000000000000 0000404191B22C35E4FF2D37EAFF1719647D0000000000000000000000002635 54745173B7FF46629DD9243351713C5C89C5386094FF1120367C000000000000 000000000000384E7BA22533506A01010202000000000304162316258FC5304B DDFF3C5BEEFF3754ECFF304CEBFF2E49EBFF2E48EBFF324DECFF3E5EECFF5072 F1FF4F71EAFF2C43BCEC14226698060B1F3000000000071C08403A9D5CFF63D0 9EFF6DD4A6FF77D6ABFF74D3A7FF7FD6ADFF88D7B2FF93D9B8FF9CDBBDFFA5DD C2FFADDFC6FF9BCFB3FF58A471FF00000000000000002329DEFF242AE7FF272A 8DA7000000002D3190AE272FE2FF242BE7FF242AE8FF262CD8FE2D2F535F0000 00002627444E252BDEFF252AE8FF11146A800000000000000000000000004C69 A6DB4C6AA7DD090C131900000000263C5782375F92FF0E1C306E000000000000 0000644A30989E7147FF95673DFF724C2BCC000000000E17709F2A43E4FF2F49 E4FF2C45E4FF2740E4FF273FE4FF273FE4FF273FE4FF273FE4FF273FE4FF304B E6FF4667E9FF5072ECFF2237C4FF0910446E00000000389B5AFF5ED09DFF65D2 A1FF6DD4A6FF77D6ABFF80D9B1FF8CDCB8FF96DEBEFFA1E1C5FFABE4CBFFB5E7 D1FFBEE9D6FFA4D4BBFF58A471FF00000000000000001F24E0FF1C1FE6FF2B30 9EB5000000000C0C15182C3194AD2127E1FE1C1FE6FF1C1FE4FF2429DAFE2124 5D6A3437636F2025E1FF1B1FE7FF11156D80000000000506090C192235464D6A A8DE0D111B24000000000000000016213454365D90FF0F1C306D000000000000 0000B3895CFFE2BB89FFD4A568FFB07E48FF00011E421B2CB4E92C45E1FF2439 DEFF2136DDFF2136DDFF2136DDFF2136DDFF2136DDFF2136DDFF2136DDFF2236 DDFF263BDDFF405FE4FF3C5BE2FF0E1771A6000000003C7346C08BE0B9FF65D2 A1FF6DD4A6FF77D6ABFF80D9B1FF8CDCB8FF96DEBEFFA1E1C5FFABE4CBFFB5E7 D1FFBEE9D6FFA4D4BBFF58A471FF00000000000000002C32DDF91A1AE5FF3137 D3ED0000000000000000000000002E3599AE171BE1FF1617E2FF1617E4FF272D DEFC3D48D7F61719E3FF171AE4FF1F246B7900000000835F3DCC9B6D43FF9364 3BFF5539229D000000000000000001010203315086FD11213880000000000000 0000BD9466FFF2D7B4FFE6C295FFBE9363FF02034B7D2339C9FE4264DFFF253C D9FF1A2CD6FF1B2DD6FF1E30D7FF2338D8FF263DD9FF2237D8FF1D2FD6FF1A2C D6FF1A2BD6FF2A43DAFF3A58DFFF101B7FB500000000000000001B6F22FF8BDF B9FF6DD4A6FF77D6ABFF80D9B1FF8CDCB8FF94DDBDFF99DFC0FF99DEC0FF95DC BCFF8CD8B6FF85C9A7FF58A471FF00000000000000002C33B1C5262AE7FF1F23 E3FF3B4296A204040707000000000C0D161830389DAF1C22E3FF1414E2FF1516 E2FF181CE2FF1B1EE4FF212BE4FF1E21404500000000CDA679FFDDB37EFFD09E 5EFF95663CFF0000000000000000000000000F182749142945A6000000000000 00009D7D58CCDEBF9AFFD6B38AFFAB8760E601013D61273CC0F7698DE8FF314A D9FF1422D2FF1624D2FF263DD5FF4363DEFF5E81E4FF5072E1FF314BD8FF1929 D3FF1320D2FF1F33D4FF2A42D7FF0B1271A40000000000000000000000003974 47C083DDB4FF77D6ABFF2F803BFF1A42217E1D44257E2047297E234A2D7E264C 307E284E337E2A50367F2C52398000000000000000002A316C731E26E6FF2F38 E8FF161AE4FF3B4498A2000000000000000000000000323B95A0171BE5FF1414 E2FF171AE4FF2E38E8FF4D58CBD90404060700000000DAB992FFEED1AAFFE1BB 8AFF9F7247FF00000000000000007C5A3AC09D6F45FF96673DFF8C5D35FA2B1C 104F000000000000000000000000000000000000121D1B2AA0D78DAEEFFF5E81 E2FF273FD3FF1E31D1FF263ED3FF3E5DC7F66586BEE5A5C2F2FF7498E8FF3C5A D8FF2237D1FF1522CEFF1625CBFF0407486E0000000000000000000000000000 000024762DFF84DDB4FF2F803BFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000008080E0E3D49B8C33643 ECFF4554EBFF2D37E9FF353EDCED2C33A9B6262E9CA72F38D0E11C23E7FF2F39 E8FF404FECFF3946CFDE0F101B1C0000000000000000BF9F7BE6DCBC95FFD2AE 84FF876442CC0000000000000000CAA375FEDCB37DFFD2A163FFC7914AFF4831 1D7F00000000000000000000000000000000000000000609527A4B68D3FF96B5 F0FF7094E6FF314CD4FF1624C7FF070B5F8E040615274D64B9E391B1EDFF84A7 EBFF486ADBFF1522C9FF080C99E10101111F0000000000000000000000000000 000000000000367648C02F803BFF000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000003E4A B9C1313EEDFF6D87F1FF637CF0FF4253EBFF3743E9FF4B5DECFF728EF2FF5369 EFFF3C4DEEF91F223D3F00000000000000000000000000000000000000000000 0000000000000000000000000000D6B38AFFEACA9FFFDFB784FFD4A568FF4D36 21800000000000000000000000000000000000000000000002040202639D2236 BBFF2841C7FF101AB8FF03035EA300000107000000000000263D0C14A4F32439 BFFF131FBCFF080C91D700000612000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000090A 1010282F6B6D3A47BDC55367EFF95C75F6FF5E77F5FF5A72F3FC4E60D8E02C35 888C111320200000000000000000000000000000000000000000000000000000 0000000000000000000000000000D9BA97F8F6DDBDFFEDCEA6FFE2BC8BFF4E39 2479000000000000000000000000000000000000000000000000000000000101 1E300202355301011F31000000000000000000000000000000000000090E0101 253B0101263D0000090F00000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000937552BEC0986AFFBA9163FFAF8559FA3528 1A4E000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000200000000100010000000000000100000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000} end object MainMenuOne: TMainMenu Images = ImageList1 Left = 104 Top = 72 object Novidades1: TMenuItem Caption = 'Novidades' object Action11: TMenuItem Action = Action1 SubMenuImages = ImageList1 end object Action21: TMenuItem Action = Action2 SubMenuImages = ImageList1 end object Action31: TMenuItem Action = Action3 SubMenuImages = ImageList1 end object Action41: TMenuItem Action = Action4 SubMenuImages = ImageList1 end end end end O que pode estar causando tal erro ?
    • By carlos melo
      Boa noite, trabalho com Delphi e estou tendo dificuldade em fazer conexão com meu servidor que esta na argentina, uso o firedac para fazer a conexão com o banco, so que o comando que estou utilizando esta dando erro e não sei se estou configurando certo a minha query.
       
      Ja criei os linked server e tambem não resolveu......
       
       uso um select dentro do delphi dessa maneira : 
      DELPHI
      FDQuery e dentro uso esse select
      Select * from [192.168.XX.XXX].banco.dbo.tabela direcionando para o meu servidor que esta na argentina sendo 192.168.xx.xxx o ip do servidor de la e o nome do banco é servicos e a tabela ordens.
       
      Se alguem conhece ou ja fez esse tipo de conexão , estou precisando dessa grande ajuda...
       
      obrigado
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.