Комментарии:
I need % to filter the parameter example like 12A%555, but by putting the % in serchtextbox an error triggers I need your help thank you, here is my code: Sub filterdg1()
If cbrech.Text = "Contient" Then
Dim dvccopy As DataTable = dtart.Copy
Dim dvc As DataView = dvccopy.DefaultView
dvc.RowFilter = "refart like '*" + T1.Text + "%' and desart like '%" + t2.Text + "%' and Marque like '%" + t3.Text + "%' and Famille like '%" + t4.Text + "%' "
DataGridView1.DataSource = dvc
ElseIf cbrech.Text = "Commence par" Then
Dim dvccopy As DataTable = dtart.Copy
Dim dvc As DataView = dvccopy.DefaultView
dvc.RowFilter = "refart like '" & T1.Text & "%' and desart like '" & t2.Text & "%' and Marque like '" & t3.Text & "%' and Famille like '" & t4.Text & "%' "
DataGridView1.DataSource = dvc
End If
TextBox1.Text = DataGridView1.RowCount.ToString
End Sub
my database is mysql
رائع ...
ОтветитьGood & Simple Code.
ОтветитьI got an error with "sda.Fill(dt)" As I think it is a data source problem, could you tell me how to get data source.
Ответитьi have an error The name 'Me' does not exist in the current context.
have any idea how to fix this? im using visual studio btw
Thanks for the video, great work, I am trying to write a similar function in VB, the editor does not accept sqlcommand . is the code in C# or in VB? can you please advise?, Thanks in advance
ОтветитьIf you please, what is the parm1
ОтветитьI have a question if its posible. I have a query with inners from several tables. i want to use it for this search. Example
i type a number on text box and it will look up this info into a few tables (more than 5 ) how do i configure de textbox search.? if i do just 1 table on my where on sql query is okay , but i need info from mor tables.
Can you help me I am getting an error when I run it says Incorrect syntax near the word 'like" and it highlights sda.Fill(dt) with a big X
Ответить