Ver Mensaje Individual
  #2  
Antiguo 25-10-2007
pcicom pcicom is offline
Miembro
 
Registrado: may 2003
Ubicación: MONTERREY MEXICO
Posts: 253
Reputación: 22
pcicom Va por buen camino
Porque mejor no intentas crear tu instruccion SQL concatenada, es mas simple sin tando show...

Código Delphi [-]
     

cSql := 'SELECT * FROM Personal, Proceso WHERE ';
cSql := cSql + ' Personasl.Per_Nro=Proceso.Per_Nro AND Proceso.Pro_Tipo='+QuotedStr(cVar1)+'  AND ';
cSql := cSql + ' Proceso.Pro_Fecha='+sqldma(cVar2) + ' AND ';
cSql := cSql + ' Proceso.Pro_Internet='+QuotedStr(cVar3) ;
cSql := cSql + ' Order By Personal.Per_Rut';


Datos.AQ_Select.Close;
Datos.AQ_Select.SQL.Clear;
Datos.AQ_Select.SQL.Add(cSql);
Datos.AQ_Select.open;

ACTUALIZACION

Código Delphi [-]
 

cSql := 'UPDATE Proceso  Set Pro_Internet='+QuotedStr('PR');
cSql := cSql + ' WHERE Pro_Tipo='+QuotedStr(cVar1)+'  AND ';
cSql := cSql + ' Pro_Fecha='+sqldma(cVar2) + ' AND ';
cSql := cSql + ' Pro_Internet='+QuotedStr('OK');


Datos.AQ_Select.Close;
Datos.AQ_Select.SQL.Clear;
Datos.AQ_Select.SQL.Add(cSql);
Datos.AQ_Select.ExecSQL;


De esta Manera es mas FACIL detectar ERRORES de los comandos SQL..

PUEDES desplegar la variable cSQL y o grabarla en el CLIPBOARD, y probarla con el DBADMIN de tu preferencia...
__________________
Poco ha de saber el que no pregunta.. Yo por eso soy un pregunton
Responder Con Cita