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
  #6  
Antiguo 07-04-2005
MasterXP MasterXP is offline
Miembro
 
Registrado: ene 2005
Posts: 193
Poder: 22
MasterXP Va por buen camino
Ahh, tambien he creado una funcion, que et sirve para saber si existe, y cual es el ultimo numero de un campo numerico en la DB.

Código Delphi [-]
 Function BancaNext(X:Integer):Integer;
 begin
 With Datamodule1 DO
 Begin
 ADOQueryGeneral.Close;
 ADOQueryGeneral.SQL.Clear;
 ADOQueryGeneral.SQL.Add('SELECT BANCA FROM empleados_Datos');
 ADOQueryGeneral.Open;
 ADOQueryGeneral.First;
 X:=ADOQueryGeneral.Fields[0].AsInteger;
 WHILE X=ADOQueryGeneral.Fields[0].AsInteger do
 begin
 X:=X+1;
 ADOQuerygeneral.Next;
 End;
 Result:=X;
 end;
 end;

espero te sirva, un salu2.
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


La franja horaria es GMT +2. Ahora son las 10:55:28.


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