Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 19-06-2010
Avatar de ingabraham
ingabraham ingabraham is offline
Miembro
 
Registrado: ago 2007
Posts: 614
Poder: 17
ingabraham Va por buen camino
Problema con el IBDATASET

Hola tengo una consulta donde tengo campos BLOB , Por tal motivo utilizo un ibdataset

para mostrar el texto de este campo en el evento ongettext
Código Delphi [-]
 Text  :=  IBDataSet1.Fields[2].AsString;

ahora , tengo el sgte codigo , pero la consulta se me pone super lenta y me bloquea el delphi hasta cerrarse, por q, q me falta, como tengo q hacer la consulta

evento onchange del edit de consulta like
Código Delphi [-]
if Ednombre.Text <> '' then
with IBDataSet1 do
begin
 close;
 SelectSQL.Clear;
  if Label1.Caption = 'Forma de Pago' then
  SelectSQL.Add('select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(FORMA_PAGO) Like:nom ');
  if Label1.Caption = 'Lugar de Ejecución' then
    SelectSQL.text:='select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(LUGAR_EJECUCION) Like:nom ';
  if Label1.Caption = 'Actividades' then
    SelectSQL.text:='select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(ACTIVIDADES) Like:nom ';
  if Label1.Caption = 'Obligaciones del Dpto' then
    SelectSQL.text:='select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(OBLIGACIONES_DPTO) Like:nom ';
  if Label1.Caption = 'Garantias' then
    SelectSQL.text:='select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(GARANTIAS) Like:nom ';
  if Label1.Caption = 'Objeto' then
    SelectSQL.text:='select FORMA_PAGO,LUGAR_EJECUCION,ACTIVIDADES,OBLIGACIONES_DPTO,GARANTIAS,OBJETO from CONTRATOS where  upper(OBJETO) Like:nom ';
 

 ParamByName('Nom').AsString := Uppercase( Ednombre.Text+'%');
 open;
end;
__________________
Enseñar es la virtud de un sabio.
Responder Con Cita
  #2  
Antiguo 22-06-2010
rrf rrf is offline
Miembro
 
Registrado: ago 2003
Ubicación: S/C Tenerife, España
Posts: 454
Poder: 21
rrf Va por buen camino
Question

Hola.

¿Por qué no usas un campo Char o VarChar para guardar texto? Me parece lo más normal.

La verdad es que me parece raro hacer una consulta sobre un campo blob, que supuestamente almacenan datos binarios (pero aclaro que soy un novato en esto).

Lo haces sobre Firebird ¿no?

Ramón.
Responder Con Cita
  #3  
Antiguo 22-06-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Los campos BLOBs de firebird pueden almacenar también sólo texto si se especifica en la declaración del mismo.
Pero, de todas formas, creo que falta bastante más información para poder ayudar en este tema, porque ¿Qué guardas en el blob, el nombre?
Responder Con Cita
  #4  
Antiguo 22-06-2010
Avatar de ingabraham
ingabraham ingabraham is offline
Miembro
 
Registrado: ago 2007
Posts: 614
Poder: 17
ingabraham Va por buen camino
Hola gracias por su atencion.

Guardo mi campo nombre como Blob , por que es un campo muy grande sin saber q tamaño en longitud podria poseer este.
son grandes parrafos.
__________________
Enseñar es la virtud de un sabio.
Responder Con Cita
  #5  
Antiguo 22-06-2010
Avatar de Casimiro Notevi
Casimiro Notevi Casimiro Notevi is offline
Moderador
 
Registrado: sep 2004
Ubicación: En algún lugar.
Posts: 32.044
Poder: 10
Casimiro Notevi Tiene un aura espectacularCasimiro Notevi Tiene un aura espectacular
Pero entonces cuál es el problema, haciendo el qué?
Responder Con Cita
  #6  
Antiguo 22-06-2010
rrf rrf is offline
Miembro
 
Registrado: ago 2003
Ubicación: S/C Tenerife, España
Posts: 454
Poder: 21
rrf Va por buen camino
Pues, si es así, ¿por qué no lo defines como Varchar (200) (supongo que el nombre no ocupará más de 200 caracteres)?.

Los varchar solo ocupan el tamaño del texto que incluyen.

Y de esa manera, creo que no te dará problemas con las órdenes SQL.

Ramón.
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Problema con la actualización IBDataset Vlady Conexión con bases de datos 6 04-12-2006 05:40:38
uso del IBDataSet Giniromero Conexión con bases de datos 21 10-07-2006 00:12:47
IBDataset no modifica istradlin Conexión con bases de datos 2 19-04-2005 23:44:22
Problema con filtro en IBDataset senpiterno Conexión con bases de datos 2 31-01-2005 00:19:51
Problema con ibDataSet y parametros. Nuria Conexión con bases de datos 8 01-08-2003 10:40:50


La franja horaria es GMT +2. Ahora son las 01:56:46.


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