Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

 
 
Herramientas Buscar en Tema Desplegado
  #9  
Antiguo 12-03-2010
aanil aanil is offline
Miembro
 
Registrado: abr 2006
Posts: 155
Poder: 21
aanil Va por buen camino
Hola.

Voy a probar eso que me dices:

Esta es la forma como lo tengo

Código Delphi [-]
procedure TForm3.BitBtn4Click(Sender: TObject);
begin

if radioButton1.Checked = true then
begin
   with datam.Query1 do begin;

close;
sql.Clear;

sql.Add('select NOMBRES,MATRICULA,CLAVE,A1 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
end;


if radioButton2.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A2 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;

end;
 end;

if radioButton3.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A3 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
 edit;

end;
 end;

 if radioButton4.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A4 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

 if radioButton5.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A5 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

if radioButton6.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A6 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

if radioButton7.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A7 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

if radioButton8.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A8 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

 if radioButton9.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES,MATRICULA,CLAVE,A9 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
 end;

 if radioButton10.Checked = true then
begin
   with datam.Query1 do begin;
close;
sql.Clear;
sql.Add('select NOMBRES, MATRICULA,CLAVE,A10 from 20092');
sql.Add('where clave ='+quotedstr(combobox1.Text));
sql.Add(   'order by nombres asc');
open;
edit;
end;
end;
end;

Y esta funcionando.

Lo que se ve es muy largo, pero eso es lo que tengo.

Saludos..
Responder Con Cita
 



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
Hacer que una columna de un DbGrid aparezca distinta según valor Aprendiendo OOP 11 30-11-2018 14:47:20
error de sql server "Informacion de columna clave insuficiente" jhcaboverde Conexión con bases de datos 1 17-08-2007 19:40:31
Informacion de columna clave insuficiente para realizar la operacion update o refresh Cabanyaler MS SQL Server 11 04-06-2007 13:25:04
informacion de columna clave insuficiente vipernet MS SQL Server 6 07-09-2006 20:26:40
Extraer datos de una pagina en java que tiene clave (sabiendo la clave claro) ;) kalimocho Internet 2 29-06-2005 05:11:24


La franja horaria es GMT +2. Ahora son las 05:21:35.


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