Visual Basic ve Acces'ten iyi anlayan var mı?

Katılım
21 Şub 2011
Mesajlar
176
sor hocam bi bakalım.
vb ve access kullandığım dil ve db değil ama olsun. bakarız.
 
Katılım
23 Ağu 2009
Mesajlar
842
database baglama ile ilgini bir sorunun var sanirim anlat yardimci olmaya calisalim .
 
Katılım
27 Eyl 2007
Mesajlar
1,686
zamanında 2 gün aralıksız uğraşmıştım bu işle çözüm fikri verebilirim en azından sorunu söyle hele :)
 
Katılım
21 Şub 2011
Mesajlar
176
bu saate kadar tırmalamadığına göre o kadar önemli olmasa gerek :D
 
Katılım
18 Eki 2008
Mesajlar
2,823
pfff. benimde finaller accessden dedim acaba şöyle dişli bi örnek çıkar mı önümüze ama yok.
 
Katılım
2 Nis 2011
Mesajlar
336
vallahi beklemişiniz kusura bakmayın abiler, bende yapmaya çalışıyorum gece ama olmadı.

Bilgisayar toplama programım/fiyat hesaplatamiyorum

Merhaba herkese. ATL 11. sınıf Veritabanı öğrencisiyim. Hocamız bizden herhangi bir Proje/program yapmamızı istedi, bu yaptığımız programı staj için de geliştirip verebileceğimizi söyledi.
Ben stajda da bu programı verecem tabi geliştirerek.

Şimdi ben bu programda, seçilen CPU-RAM-GPU vs. veritabanına da yazdırıyorum.
Fiyatları veritabanından alacak sabit fiyat.
İstediğim seçilen parçalarının fiyat toplamını textboxa yazacak?
Sanırım oledb data reader kullanılarak yapılacak?
Umarım anlatabilmişimdir.

Hesaplaya basıldığında alt çaprazındaki textboxa seçilen parçaların toplamını yazacak tek sorum bu.

adszcj.jpg




bunlarda veri tabanından görüntüler


2j5xdfs.png




1o9lbn.png





Kodlar


Kod:
Imports System.Data.OleDb
Public Class Form1
    Dim x, y, z, p As Integer
    Dim w, a, b As String
    Dim baglanti As OleDbConnection
    Dim toplam As Integer
    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        Select Case ComboBox1.Text
            Case "İntel"
                ComboBox2.Text = "İntel"
                ComboBox2.Items.Clear()
                ComboBox2.Items.Add("İntel i7 Sandy Bridge 2600K")
                ComboBox2.Items.Add("İntel i5 Sandy Bridge 2500")
                ComboBox2.Items.Add("İntel Quad 8400")

            Case "Amd"
                ComboBox2.Text = "Amd"
                ComboBox2.Items.Clear()
                ComboBox2.Items.Add("Amd Phenom X6 1090T")
                ComboBox2.Items.Add("Amd Phenom X4 955")
                ComboBox2.Items.Add("Amd Athlon X3 640")
        End Select
    End Sub

    Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
        Select Case ComboBox2.Text
            Case "İntel i7 Sandy Bridge 2600K"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus |  i7 Uyumlu")
                ComboBox3.Items.Add("Gigabyte |  i7 Uyumlu")
                ComboBox3.Items.Add("MSI |  i7 Uyumlu")

            Case "İntel i5 Sandy Bridge 2500"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus |  i5 Uyumlu")
                ComboBox3.Items.Add("Gigabyte |  i5 Uyumlu")
                ComboBox3.Items.Add("MSI |  i5 Uyumlu")

            Case "İntel Quad 8400"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus |  Quad Uyumlu")
                ComboBox3.Items.Add("MSI |  Quad Uyumlu")
                ComboBox3.Items.Add("Gigabyte |  Quad Uyumlu")

            Case "Amd Phenom X6 1090T"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus | Amd X6 1090T Uyumlu")
                ComboBox3.Items.Add("Gigabyte | Amd X6 1090T Uyumlu")
                ComboBox3.Items.Add("MSI | Amd X6 1090T Uyumlu")

            Case "Amd Phenom X4 955"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus | Amd X4 955 Uyumlu")
                ComboBox3.Items.Add("Gigabyte | Amd X4 955 Uyumlu")
                ComboBox3.Items.Add("MSI | Amd X4 955 Uyumlu")

            Case "Amd Athlon X3 640"
                ComboBox3.Items.Clear()
                ComboBox3.Items.Add("Asus | Amd X3 640 Uyumlu")
                ComboBox3.Items.Add("Gigabyte | Amd X3 640 Uyumlu")
                ComboBox3.Items.Add("MSI | Amd X3 640 Uyumlu")

        End Select
    End Sub
    Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
        Select Case ComboBox3.Text
            Case "Asus |  i7 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")

            Case "Gigabyte |  i7 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")

            Case "MSI |  i7 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")


            Case "Asus |  i5 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")

            Case "Gigabyte |  i5 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")

            Case "MSI |  i5 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")


            Case "Asus |  Quad Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

            Case "Gigabyte |  Quad Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

            Case "MSI |  Quad Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
                ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")


            Case "Asus | Amd X6 1090T Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

            Case "Gigabyte | Amd X6 1090T Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

            Case "MSI | Amd X6 1090T Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")


            Case "Asus | Amd X4 955 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

            Case "Gigabyte | Amd X4 955 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

            Case "MSI | Amd X4 955 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")


            Case "Asus | Amd X3 640 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

            Case "Gigabyte | Amd X3 640 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

            Case "Msı | Amd X3 640 Uyumlu"
                ComboBox10.Items.Clear()
                ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
                ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")
        End Select
    End Sub
    Private Sub ComboBox12_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox12.SelectedIndexChanged
        Select Case ComboBox12.Text
            Case "ATI"
                ComboBox13.Text = "ATI"
                ComboBox13.Items.Clear()
                ComboBox13.Items.Add("ATI Radeon 5850 Full HD")
                ComboBox13.Items.Add("ATI Radeon 2600")
                ComboBox13.Items.Add("ATI Radeon 4600")
            Case "NVIDIA"
                ComboBox13.Text = "NVIDIA"
                ComboBox13.Items.Clear()
                ComboBox13.Items.Add("NVIDIA Gtx 580")
                ComboBox13.Items.Add("NVIDIA Gtx 480")
                ComboBox13.Items.Add("NVIDIA Gtx 460")
        End Select
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        baglanti = New OleDbConnection("Provider=microsoft.jet.oledb.4.0;data source = 'toplama.mdb'")

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            Dim komut As OleDbCommand
            baglanti.Open()
            komut = New OleDbCommand("Insert into Tablo1([CPU_Çipset], [CPU_model], [Anakart], [Ram], [PSU], [Ekran_Çipset], [Ekran_Kartı], [Harddisk]) Values (' " & ComboBox1.SelectedItem.ToString & " ', ' " & ComboBox2.SelectedItem.ToString & " ', ' " & ComboBox3.SelectedItem.ToString & " ', ' " & ComboBox10.SelectedItem.ToString & " ', ' " & ComboBox11.SelectedItem.ToString & " ', ' " & ComboBox12.SelectedItem.ToString & " ',  ' " & ComboBox13.SelectedItem.ToString & " ', ' " & ComboBox15.SelectedItem.ToString & " ')", baglanti)
            komut*****cuteNonQuery()
            baglanti.Close()
        Catch
            MsgBox("Lütfen Hatalı Seçim Yapmayın")
        End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        'Dim toplam, m, n, l As Integer
        'Dim komut2 As OleDbCommand
        'Dim oku As OleDbDataReader
        'baglanti.Open()
        'komut2 = New OleDbCommand("Select * from fiyat", where Select Case ComboBox1.Text = [Modeli]
        'm = oku(2)
        'toplam = toplam + m
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        ComboBox1.Text = ""
        ComboBox2.Text = ""
        ComboBox3.Text = ""
        ComboBox10.Text = ""
        ComboBox11.Text = ""
        ComboBox12.Text = ""
        ComboBox15.Text = ""
        ComboBox13.Text = ""

    End Sub

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub
End Class


Imports System.Data.OleDb
Public Class Form1
Dim x, y, z, p As Integer
Dim w, a, b As String
Dim baglanti As OleDbConnection
Dim toplam As Integer
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.Text
Case "İntel"
ComboBox2.Text = "İntel"
ComboBox2.Items.Clear()
ComboBox2.Items.Add("İntel i7 Sandy Bridge 2600K")
ComboBox2.Items.Add("İntel i5 Sandy Bridge 2500")
ComboBox2.Items.Add("İntel Quad 8400")

Case "Amd"
ComboBox2.Text = "Amd"
ComboBox2.Items.Clear()
ComboBox2.Items.Add("Amd Phenom X6 1090T")
ComboBox2.Items.Add("Amd Phenom X4 955")
ComboBox2.Items.Add("Amd Athlon X3 640")
End Select
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
Select Case ComboBox2.Text
Case "İntel i7 Sandy Bridge 2600K"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | i7 Uyumlu")
ComboBox3.Items.Add("Gigabyte | i7 Uyumlu")
ComboBox3.Items.Add("MSI | i7 Uyumlu")

Case "İntel i5 Sandy Bridge 2500"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | i5 Uyumlu")
ComboBox3.Items.Add("Gigabyte | i5 Uyumlu")
ComboBox3.Items.Add("MSI | i5 Uyumlu")

Case "İntel Quad 8400"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | Quad Uyumlu")
ComboBox3.Items.Add("MSI | Quad Uyumlu")
ComboBox3.Items.Add("Gigabyte | Quad Uyumlu")

Case "Amd Phenom X6 1090T"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | Amd X6 1090T Uyumlu")
ComboBox3.Items.Add("Gigabyte | Amd X6 1090T Uyumlu")
ComboBox3.Items.Add("MSI | Amd X6 1090T Uyumlu")

Case "Amd Phenom X4 955"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | Amd X4 955 Uyumlu")
ComboBox3.Items.Add("Gigabyte | Amd X4 955 Uyumlu")
ComboBox3.Items.Add("MSI | Amd X4 955 Uyumlu")

Case "Amd Athlon X3 640"
ComboBox3.Items.Clear()
ComboBox3.Items.Add("Asus | Amd X3 640 Uyumlu")
ComboBox3.Items.Add("Gigabyte | Amd X3 640 Uyumlu")
ComboBox3.Items.Add("MSI | Amd X3 640 Uyumlu")

End Select
End Sub
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged
Select Case ComboBox3.Text
Case "Asus | i7 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")

Case "Gigabyte | i7 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")

Case "MSI | i7 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 2000 Mhz 8 Gb Ram")


Case "Asus | i5 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")

Case "Gigabyte | i5 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")

Case "MSI | i5 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Corsair DDR3 2000 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 8 Gb Ram")


Case "Asus | Quad Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

Case "Gigabyte | Quad Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

Case "MSI | Quad Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")
ComboBox10.Items.Add("Kingston DDR2 1066 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")


Case "Asus | Amd X6 1090T Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

Case "Gigabyte | Amd X6 1090T Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

Case "MSI | Amd X6 1090T Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")


Case "Asus | Amd X4 955 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

Case "Gigabyte | Amd X4 955 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")

Case "MSI | Amd X4 955 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR3 1600 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR3 1333 Mhz 4 Gb Ram")


Case "Asus | Amd X3 640 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

Case "Gigabyte | Amd X3 640 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")

Case "Msı | Amd X3 640 Uyumlu"
ComboBox10.Items.Clear()
ComboBox10.Items.Add("Kingston DDR2 800 Mhz 1 Gb Ram")
ComboBox10.Items.Add("Corsair DDR2 667 Mhz 512 Mb Ram")
End Select
End Sub
Private Sub ComboBox12_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox12.SelectedIndexChanged
Select Case ComboBox12.Text
Case "ATI"
ComboBox13.Text = "ATI"
ComboBox13.Items.Clear()
ComboBox13.Items.Add("ATI Radeon 5850 Full HD")
ComboBox13.Items.Add("ATI Radeon 2600")
ComboBox13.Items.Add("ATI Radeon 4600")
Case "NVIDIA"
ComboBox13.Text = "NVIDIA"
ComboBox13.Items.Clear()
ComboBox13.Items.Add("NVIDIA Gtx 580")
ComboBox13.Items.Add("NVIDIA Gtx 480")
ComboBox13.Items.Add("NVIDIA Gtx 460")
End Select
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

baglanti = New OleDbConnection("Provider=microsoft.jet.oledb.4.0;data source = 'toplama.mdb'")

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim komut As OleDbCommand
baglanti.Open()
komut = New OleDbCommand("Insert into Tablo1([CPU_Çipset], [CPU_model], [Anakart], [Ram], [PSU], [Ekran_Çipset], [Ekran_Kartı], [Harddisk]) Values (' " & ComboBox1.SelectedItem.ToString & " ', ' " & ComboBox2.SelectedItem.ToString & " ', ' " & ComboBox3.SelectedItem.ToString & " ', ' " & ComboBox10.SelectedItem.ToString & " ', ' " & ComboBox11.SelectedItem.ToString & " ', ' " & ComboBox12.SelectedItem.ToString & " ', ' " & ComboBox13.SelectedItem.ToString & " ', ' " & ComboBox15.SelectedItem.ToString & " ')", baglanti)
komut*****cuteNonQuery()
baglanti.Close()
Catch
MsgBox("Lütfen Hatalı Seçim Yapmayın")
End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
'Dim toplam, m, n, l As Integer
'Dim komut2 As OleDbCommand
'Dim oku As OleDbDataReader
'baglanti.Open()
'komut2 = New OleDbCommand("Select * from fiyat", where Select Case ComboBox1.Text = [Modeli]
'm = oku(2)
'toplam = toplam + m
End Sub


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox10.Text = ""
ComboBox11.Text = ""
ComboBox12.Text = ""
ComboBox15.Text = ""
ComboBox13.Text = ""

End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

End Sub
End Class


Şimdiden teşekkür ederim




mümkün olduğunda açık/anlaşılır bir şekilde anlatmaya çalıştım, anlamadığınız yer varsa sorun
yapan(lar) olursa çok minnettar kalırım, olmassa da canınız sağolsun :)
 

COQ

Motosiklet Eğitmeni
Katılım
27 Ocak 2008
Mesajlar
11,727
VB den hiç anlamiyorum ama genlerimizden gelen her konuda ahkam kesme dürtüsüne karsi koyamiyorum.:)

Ben senin yerine olsam, degisken degil sabit kullanirdim.
Nasilsa hesap yapan basit bir program olacak bu.
Ne sakincasi olur?
Kullanici fiyat degisikligi yapamaz.
Ama gördügüm kadariyla senin arayüzde zaten böyle bir seçenek yok.
Yani fiyat degisikliklerinin veri tabanindan yapilmasi gerekiyor.
Bu son kullanici için pratik bir yöntem degil bence.
Ileride gelistirecegin zaman dusunursun bunlari.
Amaç hizli sonuç almaksa, bence hesap makinasi gibi bisey yap olsun bitsin.:)
 
Katılım
2 Nis 2011
Mesajlar
336
İstediğimiz de, accessten fiyat değişikliği olacak tabi.
Sabit değişken derken? geliştirmek yani nasıl diyim Kasa koycam, hazır sistem koycam, daha fazla bileşen, soğutucular vsvsvs
 
Son düzenleme:
Katılım
5 May 2009
Mesajlar
1,123
Formun Loadunda comboları veri tabanından okuyarak doldur. Insert Into değil Select Clause kullan (Örn: "SELECT Field1, field2 FROM Table1 WHERE Field1 = 'Bilmemne' ORDER BY Field2" gibi)

Şu anda makinemde yeni versiyon vb lerin hiçbiri yüklü değil. vb6 ile işini görürse bir örnek kod yazarım senin için...
 
Katılım
2 Nis 2011
Mesajlar
336
saol dostum da vb6 bilmiyorum kullanmadım daha önce
select clause görmedik, öğretmediler

---------- Mesaj ekleme zamanı: 17:53 ---------- İlk mesajı ekleme zamanı 17:46 ----------

şöyle düşündüm her parça için ayrı tablo açıcam anakart için ayrı cpu için ayrı...
Bir marka cpu cektiginde o satırdaki fiyatta gelicek sonra her bileşen için arka planda toplatacam ve yazdıracam ama nasıl? :)

son gelişmeleri akşam paylaşırım.
 
Katılım
5 May 2009
Mesajlar
1,123
Yapma yahu... Select kullanmadan veri tabanı operasyonu nasıl yazacaksın ki? Toplama kullanmadan hesap makinesi yazmaya benzer o :)

http://www.sql-tutorial.net/SQL-SELECT.asp SQL ile ilgili bilmen gereken hemen herşey burada var. Öğretmelerini bekleme, kendin öğren biraz da güzel kardeşim :p

Hangi versiyon VB kullanıyorsun bu arada?
 
Katılım
19 Haz 2009
Mesajlar
282
Çok kolay yahu :queen:
Allah kolaylık versin her bölümün-mesleğin bi zorluğu aynı zamandagüzelliği oluyor.
Bende atl 10. sınıf otomasyon öğrencisiyim seneye bizden de PLC isterler heralde bakalım napcaz :mrgreen:
Allah tekrar kolaylık versin
 
Katılım
2 Nis 2011
Mesajlar
336
Şöyle bir şey düşündüm ama olmadı fakat bunun gibi olacak gibi

Dim fiyat As Integer
komut = New OleDbCommand("SELECT Fiyatı FROM fiyat WHERE Modeli= ' " & ComboBox2.SelectedItem.ToString & " ' " )
fiyat = komut*****cuteScalar()
 
Katılım
21 May 2010
Mesajlar
2,954
vb nin 2010 udamı çıktı yau :silent:

Anılarımı canlandırdı vb :salut:

Bir zamanlar onun sayesinde 0 gelen meslek dersimi 4 getirmiştim proje alarak :bounce:
vb de veri tabanı olayı çok kolaydır aslında bir kaç örnek bulursan netten çözersin anında. Yardımcı olmaya çalışırdım bende ama elimin altında vb olması lazım

---------- Mesaj ekleme zamanı: 20:13 ---------- İlk mesajı ekleme zamanı 20:10 ----------

Sen veri tabanını direk kod yazarakmı bağlıyorsun programa ?
 
Katılım
2 Nis 2011
Mesajlar
336
evet kod yazarak bağlanıyorum da
veritabanından, vb ye bağlanamadık daha :) yardımcı olursan sevinirim dostum ya
 

Bu konuyu görüntüleyen kullanıcılar

Yeni mesajlar

Çok Beğenilen Mesajlar

Üst