<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Hi Daniel, <br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">That was exactly the problem. This was already solved.<br>
<br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks for your help.<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">Em 4 de março de 2014 15:21, Daniel Erles <span dir="ltr"><<a href="mailto:derles@gmail.com" target="_blank">derles@gmail.com</a>></span> escreveu:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Intenta con esta linea:<div class=""><div><br></div><div><span style="font-family:verdana,sans-serif;font-size:13px">sql_Query.ParamByName('</span><span style="font-family:verdana,sans-serif;font-size:13px">PCodigo').AsInteger := Codigo;</span><br>
</div><div><span style="font-family:verdana,sans-serif;font-size:13px"><br></span></div></div><div><span style="font-family:verdana,sans-serif;font-size:13px">sin ":"</span></div><div><span style="font-family:verdana,sans-serif;font-size:13px"><br>
</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-03 15:58 GMT-04:00 William Oliveira Ferreira <span dir="ltr"><<a href="mailto:bdexterholland@gmail.com" target="_blank">bdexterholland@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Olá lista,<br> <br>
</div><div class="gmail_default" style="font-family:verdana,sans-serif">
eu tenho um código mamão com açúcar aqui que eu não consigo entender por que cargas d'água não encontra o parâmetro da SQL. Alguém quer chutar algo?<br>
<br>var<br> sql_Query : TSQLQuery;<br>begin<br> Result := False;<br> sql_Query := TSQLQuery.Create(nil);<br> sql_Query.DataBase := Self._Conexao;<br> sql_Query.Transaction := TSQLTransaction(Self._Conexao.Transaction);<br>
<br> sql_Query.SQL.Clear;<br> if TSQLTransaction(Self._Conexao.Transaction).Active then<br> TSQLTransaction(Self._Conexao.Transaction).EndTransaction;<br><br> sql_Query.SQL.Add('DELETE FROM loc_clientes');<br>
sql_Query.SQL.Add('WHERE cli_codigo = :PCodigo');<br><br> sql_Query.ParamByName(':PCodigo').AsInteger := Codigo;<br><br> try<br> sql_Query.ExecSQL;<br> except<br> raise Exception.Create('Erro ao excluir o cliente! [ID: ' + IntToStr(Codigo) + ']');<br>
end; <br><br>____<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">A mensagem de erro:<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Parameter ":PCodigo" not found<br>
<br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Vira e mexe esta mensagem me assombra...<br><br><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">...Digo isto porque em outros trechos não ocorre.<span><font color="#888888"><br clear="all">
</font></span></div><span><font color="#888888"><br>-- <br><font face="verdana, sans-serif">________________________________<br>William de Oliveira Ferreira<br></font>
</font></span></div>
<br></div></div><div class="">--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
<br></div></blockquote></div><br></div>
<br>--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><font face="verdana, sans-serif">________________________________<br>William de Oliveira Ferreira<br></font>
</div>