Ver Mensaje Individual
  #3  
Antiguo 04-12-2004
Avatar de sakuragi
sakuragi sakuragi is offline
Miembro
 
Registrado: feb 2004
Ubicación: root
Posts: 1.435
Reputación: 24
sakuragi Va por buen camino
hola que tal

gracias por contestar

entonses quedaria asi?

try
ConnectionSTR := '';
ConnectionSTR := ConnectionSTR + 'driver={mysql odbc 3.51 driver}';
ConnectionSTR := ConnectionSTR + 'server=localhost';
ConnectionSTR := ConnectionSTR + 'database=prueva';
ConnectionSTR := ConnectionSTR +'user=root';
ConnectionSTR := ConnectionSTR + 'password=''';
with modulodatos do
begin
adoconnection1.ConnectionString := ConnectionSTR;
adoconnection1.close;
adoconnection1.open;
end;
except
on E: Exception do showmessage(E.Message);
end;


adoconnection.close se va usar para cerrar la conexion
adoconntection.open es para abrirla???


toda la conexion se pued eponer en el formularion

y el .opes y .close cuando se quiere conectar ya sea por un boton y un evento?


de hante mano gracias
Responder Con Cita