Is there a way around when the string is to long for ExecSQL to work properlly?
thx you in advance.
Code: Select all
function TdtmCGM.AtualizarJuridica(RazaoSocial, NomeFantasia, CNPJ, Email,
Contato, WebSite, Observacao, UF, Cidade, Bairro, Logradouro, Complemento,
UFInscricaoEstadual: String; CEP, Numero, CaixaPostal, TelRamal: Integer;
InscricaoEstadual, TelResidencial, TelComercial, TelCelular,
CodJuridica: Double; DataCadastro: TDate): Boolean;
begin
Result := True;
dtmCGM.conCGMDB.StartTransaction;
with dtmCGM.conCGMDB do
begin
try
Open;
begin
ExecSQL('UPDATE juridica SET razaosocial = : RazaoSocial, nomefantasia =: NomeFantasia, cnpj = :CNPJ, email = :Email, contato = :Contato, website = :WebSite, observacao = :Observacao, uf = :UF, cidade = :Cidade, bairro = :Bairro, logradouro = :Logradouro,'
+' complemento = :Complemento, ufinscricaoestadual = :UFInscricaoEstadual, cep = :CEP, numero = :Numero, caixapostal = :CaixaPostal, telramal = :TelRamal, inscricaoestadual = :InscricaoEstadual, telresidencial = :TelResidencial,'
+' telcomercial = :TelComercial, telcelular = :TelCelular, datacadastro = :DataCadastro WHERE codjuridica = :CodJuridica',[RazaoSocial, NomeFantasia, CNPJ, Email, Contato, WebSite, Observacao, UF, Cidade, Bairro, Logradouro, Complemento, UFInscricaoEstadual, CEP, Numero, CaixaPostal, TelRamal, InscricaoEstadual, TelResidencial, TelComercial, TelCelular, CodJuridica, DataCadastro]);
end;
Commit;
Close;
except
Result := False;
conCGMDB.Rollback;
Close;
raise;
end;
end;
end;