Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/10/2008, 06:46
Avatar de Peterpay
Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 17 años, 6 meses
Puntos: 87
Respuesta: Problema cuando uso un select y un insert into en la misma función

el problema es bien simple

If DNIUsu = String.Empty Then
q = "insert into Reserva(NumClase,DNIusu,Fecha,HoraInicio,HoraFin,V al,Motivo) values ('" & aula & "', '" & dni & "', '" & fecha & "', '" & HI & "', '" & HF & "', true, '" & mot & "' )"
Dim x As New OleDbCommand(q, cnn)
h = objCmd.ExecuteNonQuery
If h Then
Response.Write("Reserva hecha con éxito")
End If

le dices que ejecute objCmd y debe ser x.ExecuteNonQuery
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5