Skip to main content

AccessTr.neT


Formda arama yapamiyorum...

Formda arama yapamiyorum...

Çözüldü #1
Imports System.Data.OleDb
Public Class PersonelK
Dim con As New OleDbConnection
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try

If Me.TextBox1.Text = "" Or Me.TextBox2.Text = "" Or Me.TextBox3.Text = "" Or Me.TextBox4.Text = "" Or Me.TextBox5.Text = "" Or Me.TextBox6.Text = "" Or Me.TextBox7.Text = "" Or Me.TextBox8.Text = "" Or Me.TextBox9.Text = "" Or Me.TextBox10.Text = "" Or Me.TextBox11.Text = "" Or Me.TextBox12.Text = "" Then
MsgBox("Seçilmesi Gereken Alanlardan Bir veya Birkaçını Seçmedin.", MsgBoxStyle.Exclamation, "Kayıt Uyarı")
Else
Dim data As New String("INSERT INTO personel_kayit (personel_kodu,adi,soyadi,memleket,dogum_tarihi,dogum_yeri,gsm1,gsm2,adres,email,kullanici_adi,sifre) values (" + TextBox1.Text + ",'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "'," + TextBox5.Text + ",'" + TextBox6.Text + "'," + TextBox7.Text + "," + TextBox8.Text + ",'" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "','" + TextBox12.Text + "')")
data = String.Format(data, TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text, TextBox9.Text, TextBox10.Text, TextBox11.Text, TextBox12.Text)
Dim baglanti As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=|DataDirectory|\yetkili.accdb; Persist Security Info=False;")
Dim komutnesnesi As New OleDb.OleDbCommand(data, baglanti)
Dim sonuc As Integer
baglanti.Open()
sonuc = komutnesnesi.ExecuteNonQuery()
If sonuc = 1 Then
MsgBox("İşyeri Bilgileri Kayıt Olmuştur.", MsgBoxStyle.Exclamation, "Kayıt İşlemi")
baglanti.Close()
End If
End If
Catch ex As Exception
MsgBox("Bir Hata Oluştu !!!!")
End Try
End Sub
End Class

veritabanı Adı : yetkili
tablo adi : personel_kayit

[Resim: veritabanfotoooo.jpg]


"Bir Hata Oluştu" diyor hep..... Nerede Hata Yapiyorum Kafayi Yicem
Son Düzenleme: 05/06/2013, 22:25, Düzenleyen: oztuncla.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Formda arama yapamiyorum... - Yazar: oztuncla - 04/06/2013, 22:25
Cvp: Formda arama yapamiyorum... - Yazar: oztuncla - 08/06/2013, 21:53
Task