bueno resulta que ya investigue y al parecer no encuentro la respuesta a mi duda del porque no puedo usar parametros en las instrucciones sql lo que para unos hacer un insert es tan facil como
Código Delphi
[-] SQL.Clear;
sql.Add('Insert into sap_serv(nombreserv,cuota)');
SQL.Add('Values( :servicio, :cuota)');
Parameters.ParamByName('servicio').Value:=wservicio;
Parameters.ParamByName('cuota').Value:=wcuota;
yo tengo que hacer lo siguiente
Código Delphi
[-]sql.Clear;
sql.Add(' insert into sap_contrato (');
Sql.Add(' nocontrato ,'); sql.Add(' nombre ,'); sql.Add(' paterno ,'); sql.Add(' materno ,'); sql.Add(' ncompleto, '); sql.Add(' localidad ,'); sql.Add(' calle ,'); sql.Add(' noext ,'); sql.Add(' noint ,'); sql.Add(' cp ,'); sql.Add(' fecharegistro ,'); sql.Add(' telefono ,'); sql.Add(' observacio, '); sql.add(' status '); sql.Add(' ) values (');
sql.Add(' '+QuotedStr(wnocontrato)+', '); sql.Add(' '+QuotedStr(wnombre)+', '); sql.Add(' '+QuotedStr(wpaterno)+', '); sql.Add(' '+QuotedStr(wmaterno)+', '); sql.Add(' '+QuotedStr(wcompleto)+', '); sql.add(' '+QuotedStr(wlocalidad)+', '); sql.Add(' '+QuotedStr(wcalle)+', '); sql.Add(' '+IntToStr(wnoint)+', '); sql.Add(' '+inttostr(wnoext)+', '); sql.Add(' '+Inttostr(wcp)+', '); sql.Add(' '+QuotedStr(DateToStr(wfechare))+', '); sql.Add(' '+QuotedStr(wtel)+', '); sql.Add(' '+QuotedStr(wobs)+', '); sql.Add(' '+Inttostr(westatus) +')'); ExecSQL;
AHORA LO QUE PREGUNTO ES HAY AKLGUNA EXTRAÑA RAZON DEL PORQUE ALGUNOS PUEDEN USAR PARAMETROS Y OTROS NO, O DEPENDE DE LA BASE DE DATOS O DE LOS COMPOMENTES QUE SE USAN PARA ACCEDER A ELLOS O DE LAS USES.
mis uses
Código Delphi
[-]uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, ComCtrls,ADODB,ComObj,DateUtils;
IS COMPONENTE SON
ADOCONEXION,ADOQUERY,ADOSTOREPROCEDURE.
Y MI BASE DE DATOS ES
SQLSERVER 2000
CONTRAVENENO, QUE USES TIENES REGISTRADAS, QUE BASE DE DATOS USAS Y QUE COMPONENTES?
ESPERO ME RESPONDAN :-)