Foros del Web » Programación para mayores de 30 ;) » Programación General » Visual Basic clásico »

problema al ingresar un dato proveniente un option buton en la bd

Estas en el tema de problema al ingresar un dato proveniente un option buton en la bd en el foro de Visual Basic clásico en Foros del Web. HOLA A TODOS TENGO EL SIGUIENTE PROBLEMA, TENGO UN FORMULARIO DONDE TENGO LOS DATOS A INGRESAR DE UN CLIETES. HAY UN DATO QUE SE LLAMA ...
  #1 (permalink)  
Antiguo 19/12/2007, 16:01
 
Fecha de Ingreso: diciembre-2007
Mensajes: 34
Antigüedad: 16 años, 4 meses
Puntos: 0
problema al ingresar un dato proveniente un option buton en la bd

HOLA A TODOS TENGO EL SIGUIENTE PROBLEMA, TENGO UN FORMULARIO DONDE TENGO LOS DATOS A INGRESAR DE UN CLIETES. HAY UN DATO QUE SE LLAMA TIPO DE PAGO Y PONGO 2 OPCIONES: DE CONTADO Y A CREDITO ¿COMO LO PUEDO IGRESAR A LA BD. UTILIZO MYSQL Y VISUAL BASIC 6. MUCHAS GRACIAS CUALQUIER RESPUESTA.

rivate Sub GUARDAR_Click()
Call conexion
Set Cm = New ADODB.Command
Cm.ActiveConnection = Cn
On Error GoTo tengoerror
Cm.CommandText = "INSERT INTO clientes(folio,nombre,rfc,direccion,cp,ciudad,tele fono,celular) values('" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "')"
Set Rs = Cm.Execute()
Rs("forma_pago") = IIf(Option1(0).Value = True, "CONTADO", IIf(Option2(1).Value = True, "CREDITO"))
MsgBox "HA SIDO INGRESADO EL CLIENTE", , "DIGITAL EXPRESS"
SetButton
Exit Sub
tengoerror:
If Err.Number = -2147217900 Then
MsgBox "ERROR AL INGRESAR EL FOLIO ESTE,YA EXISTE", , "DIGITAL EXPRESS"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End If

1 End Sub
  #2 (permalink)  
Antiguo 25/12/2007, 14:06
 
Fecha de Ingreso: julio-2007
Ubicación: Delante del PC (Barcelona
Mensajes: 157
Antigüedad: 16 años, 9 meses
Puntos: 2
Re: problema al ingresar un dato proveniente un option buton en la bd

mmmmm... xq no lo plantes de otra manera?
mira:

IF Option1(0).Value = True Then

haces la SQL para que introduzca todos los datos con la forma de pago CONTADO

ELSE

haces la SQL para que introduzca todos los datos con la forma de pago CREDITO

END IF
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:44.