Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/10/2004, 18:57
Avatar de jrp01
jrp01
 
Fecha de Ingreso: mayo-2004
Ubicación: México
Mensajes: 2.702
Antigüedad: 20 años, 9 meses
Puntos: 0
Mira creo aue es asi:
dim cn as new adodb.connection
dim rs as new adodeb.recordset
dim SQL as string
cn.open "tu conexion"

en el boton:

SQL="select count(*) from tu tabla where tu_condicion=" & text1.text
set rs=cn.execute(sentencia)
if rs(0)=1 then 'Encontro uno
SQL="update tu_tabla tucampo=" & text1.text & " where tu_condicion=" & rs(0)
cn.execute(SQL)
else
SQL="Insert into Tu tabla values(" & text1.text & ")"
cn.execute(SQL)
end if

Espero no equivocarme es que no tengo VB en este momento.

Saludos