Dim c As New OleDb.OleDbConnection
c.ConnectionString = "provider=microsoft.jet.oledb.4.0; data source =" & Application.StartupPath & "/anaokulu.mdb;"
c.Open()
Dim com As New OleDb.OleDbCommand("insert into ogrenci(tc,ad,soyad,cinsiyet,yas,ucret,adres) values (' " & TextBox1.Text & " ' , ' " & TextBox2.Text & " ' , '" & TextBox3.Text & "', ' " & ComboBox1.Text & " ' , " & TextBox4.Text & ", ' " & TextBox5.Text & " ' , '" & TextBox6.Text & "')", c)
If com.ExecuteNonQuery() > 0 Then
MsgBox("Kayıt yapıldı.")
End If
c.Close()
Bu kodlar ile vb projemizin Debugının içinde bulundan Anaokulu veritabanındaki ogrenci tablosuna verileri kaydederiz. Kolay gelsin..
Vb de access e kaydetme
Bu Konudaki Yorumlar |
Vb de access e kaydetme - Yazar: jumbo_06 - 01/04/2011, 23:22
Cvp: Vb de access e kaydetme - Yazar: ercansahin - 01/04/2011, 23:46
Cvp: Vb de access e kaydetme - Yazar: jumbo_06 - 02/04/2011, 19:38
Cvp: Vb de access e kaydetme - Yazar: Şeyma462 - 03/04/2011, 00:04
|
Konuyu Okuyanlar: 1 Ziyaretçi