(01/06/2016, 21:34)C*e*l*o*y*c*e yazdı: örneğnizi ekleyin yardımcı olmaya çalışalım
Buyrun hocam kodlar aşağıdadır.
Dim baglan As New OleDbConnection("provider=Microsoft.ACE.OLEDB.12.0; Data Source='demirbas_takip.accdb'")
Dim adaptor As New OleDbDataAdapter("select * from demirbas", baglan)
Dim komut As New OleDbCommand
Dim ds As New DataSet
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
baglan.Open()
komut.Connection = baglan
komut.CommandType = CommandType.Text
If TextBox1.Text = "" Then
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
MsgBox("lütfen tüm alanları doldurunuz..")
komut.CommandText = "insert into demirbas(urun_kod,urun_cinsi,urun_marka,urun_model,bulundugu_yer,adet) values('" & TextBox1.Text & "','" & ComboBox1.SelectedItem & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "')"
komut.ExecuteNonQuery()
baglan.Close()
MsgBox("Ürün Başarıyla Kaydedilmiştir", , "Kayıt Başarılı")
Me.Close()
Form1.Show()
End If
End Sub