
27/05/2008, 07:42
|
| | Fecha de Ingreso: marzo-2008 Ubicación: Buenos Aires,Argentina
Mensajes: 16
Antigüedad: 16 años, 11 meses Puntos: 0 | |
Respuesta: visual 2008 pasar datos a una base de datos jordift,
tu ejemplo es muy generico, hay muchas formas de hacerlo, te tiro una idea como para que sepas por donde empezar, espero no haberme olvidado de nada
Código:
Dim cnn_gestion As New OleDbConnection(Provider=Microsoft.Jet.OLEDB.4.0;Data Source=M:\xxxxx\base.mdb)
If cnn_gestion.State = ConnectionState.Closed Then
cnn_gestion.Open()
End If
dim strsql as string
strsql = "insert into nombretabla (nombre,apellido,a,b,c,) "
strsql = strsql & "values ('"textbox1.text & "', "
strsql = strsql & "'"textbox2.text & "', "
strsql = strsql & "'"valorcheqboxa & "', "
strsql = strsql & "'"valorcheqboxb & "', "
strsql = strsql & "'"valorcheqboxc & "',) "
Dim com_numero As New OleDbCommand(strsql, cnn_gestion)
Dim rst_numero As OleDbDataReader
Try
com_numero.CommandText = strsql
msg = com_numero.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message & " " & ex.Source, MsgBoxStyle.Critical)
End Try
Saludos |