Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Go Back   Foros Club Delphi > Principal > Conexión con bases de datos
Register FAQ Members List Calendar Guía de estilo Today's Posts

Conexión con bases de datos

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03/09/2003
JODELSA JODELSA is offline
Miembro
 
Join Date: May 2003
Posts: 89
Poder: 24
JODELSA Va por buen camino
Pasar Parametro A Compenente Adoquery

HOLA A TODOS!

TENGO UNA APLICACION CON PARADOX Y LA ESTOY EMIGRANDO A ACCESS CONECTANDOME CON ADO, PERO CUANDO PASO ALGUNOS PARAMETROS AL COMPONENTE ADO ME DA UN ERROR EN LA EXPRESION.

POR EJEMPLO: EN UN MOMENTO LE PASO UN PARAMETRO A LA PROPIEDAD SQL DEL COMPONENTO ADOQUERY DE LA SIGUIENTE MANERA

ADOQUERY.SQL.ADD('SELECT * FROM ARCHIVO WHERE TIPODOC ="'+EDIT1.TEXT+'" AND FECHA = "'+EDIT2.TEXT+'"');

TIPODOC ES UN CAMPO STRING;
Reply With Quote
  #2  
Old 04/09/2003
javiermorales's Avatar
javiermorales javiermorales is offline
Miembro
 
Join Date: May 2003
Location: Alicante
Posts: 272
Poder: 24
javiermorales Va por buen camino
Buenos Días, lo que debes hacer es poner comillas simples, para que se vea claramente exageraré los espacios en blanco, que luego debes eliminar:

ADOQUERY.SQL.ADD('SELECT * FROM ARCHIVO WHERE TIPODOC = ' ' '+EDIT1.TEXT+' ' ' AND FECHA = ' ' '+EDIT2.TEXT+' ' ');

Espero que te sirva, un saludo.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +2. The time now is 20:11.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi