I Use visual Basic 8.0 and Mysql 5.0
I have one Table1:
Table1:
RecordID , Integer = primary key auto_increment NOT NULL
Articlenr , Integer
Articlename, Char(20)
Table1: has nine records:
RecordID, Articlenr ,Articlename
1 , 1100, Hamer Big Red
2 , 1110, Hamer Big Blue
3 , 1120, Hamer Big Yellow
4 , 1200, Hamer Medium Red
5 , 1210, Hamer Medium Blue
6 , 1210, Hamer Medium Yellow
7 , 1300, Hamer Small Red
8 , 1300, Hamer Small Blue
9 , 1300, Hamer Small Yellow
Use Datagridview en textbox1.txt
I would if I type in the item number in textbox1.txt in data grid view slow the correct article appears.
Example:
If i type number 11 in the textbox1.txt than datagridview shows:
1 , 1100, Hamer Big Red
2 , 1110, Hamer Big Blue
3 , 1120, Hamer Big Yellow
If i further expanding number with 10 result is than
1110 in the textbox1.txt than datagridview show only Hamer Big Red.
Dim MyCommand1 As New MySql.Data.MySqlClient.MySqlCommand
Dim Myadapter As New MySql.Data.MySqlClient.MySqlDataAdapter
Dim MyBuilder As New MySql.Data.MySqlClient.MySqlCommandBuilder
Dim MyDataTable As New DataTable
MyCommand1.CommandText = "select * from Table1"
MyCommand1.Connection = conn
Myadapter.SelectCommand = MyCommand
Myadapter.Fill(MyDatatable)
DataGridView1.DataSource = MyDatatable
Thanks in advance,
Andre