Hi I have a prob with my code.
This way I get to see all the fields in table1 in the grid view but they hold no values! :( if u can help me make changes in this code..it will great!
Imports System.Data.oledb
Public Class Form1
Dim con As OleDbConnection = New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=C:\Documents and Settings\bashkark\Desktop\USERS.mdb")
Dim cmd As OleDbCommand
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
cmd = New OleDbCommand("select * from table1", con)
con.open()
ComboBox1.Items.Add("DELL")
ComboBox1.Items.Add("HP")
ComboBox2.Items.Add("HP xw6600 WS")
ComboBox2.Items.Add("HP xw6400 WS")
ComboBox2.Items.Add("HP xw4400 WS")
ComboBox2.Items.Add("HP Precision WS 670")
ComboBox2.Items.Add("HP Precision WS 690")
ComboBox2.Items.Add("HP Precision WS 650")
ComboBox2.Items.Add("HP Precision WS 470")
ComboBox2.Items.Add("HP Precision WS M65")
ComboBox2.Items.Add("HP Precision WS 530")
ComboBox2.Items.Add("HP Precision WS 550")
ComboBox3.Items.Add("1 GB")
ComboBox3.Items.Add("2 GB")
ComboBox3.Items.Add("3 GB")
ComboBox3.Items.Add("3.25 GB")
ComboBox3.Items.Add("8 GB")
ComboBox4.Items.Add("NVIDIA QUADRO FX4600")
ComboBox4.Items.Add("NVIDIA QUADRO FX540")
ComboBox4.Items.Add("NVIDIA QUADRO FX1500")
ComboBox4.Items.Add("NVIDIA QUADRO FX3450/4000 SDI")
ComboBox4.Items.Add("NVIDIA QUADRO 2 PRO")
ComboBox4.Items.Add("NVIDIA QUADRO FX1400")
ComboBox4.Items.Add("NVIDIA QUADRO FX3400")
ComboBox4.Items.Add("NVIDIA QUADRO 4900XGL")
ComboBox4.Items.Add("NVIDIA QUADRO 700XGL")
ComboBox4.Items.Add("3D Labs Wildcat T4 7110")
ComboBox5.Items.Add("6.14.11.6262")
ComboBox5.Items.Add("8.1.7.6")
ComboBox5.Items.Add("6.14.11.6008")
ComboBox5.Items.Add("6.6.0.35")
ComboBox5.Items.Add("8.4.2.6")
ComboBox5.Items.Add("6.1.2.9")
ComboBox5.Items.Add("8.4.8.0")
ComboBox5.Items.Add("6.6.0.38")
ComboBox5.Items.Add("6.14.11.6250")
ComboBox5.Items.Add("6.5.7.3.")
ComboBox5.Items.Add("8.3.1.3")
ComboBox5.Items.Add("3.0.8.2")
ComboBox5.Items.Add("5.6.7.3")
ComboBox5.Items.Add("6.1.6.1")
ComboBox5.Items.Add("7.2.2.3")
ComboBox5.Items.Add("3.0.8.2")
ComboBox5.Items.Add("8.4.3.7")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
cmd = New OleDbCommand("select * from table1 where MFG='& combobox1.text &' ", con)
Dim da As OleDbDataAdapter = New OleDbDataAdapter(cmd)
Dim ds As DataSet = New DataSet()
da.Fill(ds, "table1")
DataGridView1.DataSource = ds.Tables("table1").DefaultView
End Sub
End Class