mi problema es el sig; tengo un formulario de Visual Basic. Net cargado ya con una tabla "productos" en mi base de datos en access, y funciona bien


| |||
Código:
Asi cargas los datos de una tabla en tu combo.'Rellenar datos de los combobox ds = New Data.DataSet Ssql = "SELECT fldTUserName FROM tbl8Usuarios" da = New Data.SqlClient.SqlDataAdapter(Ssql, conection) 'Cargamos el DataSet Try da.Fill(ds, "tbl8Usuarios") Catch ex As Exception MessageBox.Show("Error al cargar:" & vbCrLf & ex.Message) End Try 'Cargo los resultados en el Combobox cmbUsuario.DataSource = ds.Tables(0).DefaultView cmbUsuario.ValueMember = "fldTUserName" Para insertar datos en la tabla utiliza un INSERT, asi:
Código:
Espero que esto te ayude. Dim SqlCommando As New SqlCommand("INSERT INTO tbl1ComputerConfig(IdXNComputer, idNItem, fldTComuperName, fldTDomainName, idNUser, fldTCPU, fldNCPUspeed, fldNRAM, fldTTipDriveA, fldTTipDriveB, fldTGbDriveC, fldTGbDriveD, fldTGbDriveE, fldTGbDriveF, fldTCDROMDrive, fldTOtherDrives, fldTVideo, fldTLANCard, fldTMAC) VALUES(' " & txtCodigo.Text & " ',' " & sel & " ',' " & txtComputerName.Text & " ',' " & txtDominio.Text & " ',' " & usuario & " ',' " & txtCpu.Text & " ',' " & txtVelocidad.Text & "',' " & txtRam.Text & "',' " & txtA.Text & "',' " & txtB.Text & "',' " & txtC.Text & "',' " & txtD.Text & "',' " & txtE.Text & "',' " & txtF.Text & "',' " & txtCDROM.Text & "',' " & txtOtros.Text & "',' " & txtVideo.Text & "',' " & txtLan.Text & "',' " & txtMac.Text & "')", conection) SqlCommando.ExecuteNonQuery() |