0% found this document useful (0 votes)
34 views2 pages

Serch

Uploaded by

Rafat Said
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Serch

Uploaded by

Rafat Said
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Public Sub Load_cadastro_feito()

dt_cadastro_feito.Clear()
Dim cmd As New SqlCommand("Select * From cadastro_feito where codigobarra +
descricao + cast(mva_original as varchar) like '%" & TextBox1.Text & "%'",
connSQLServer)
'cmd.Parameters.Add("codigobarra", SqlDbType.NVarChar).Value = parameter1
'cmd.Parameters.Add("descricao", SqlDbType.NVarChar).Value = parameter1
connSQLServer.Open()
dt_cadastro_feito.Load(cmd.ExecuteReader)
connSQLServer.Close()
cmd = Nothing
End Sub
Public Sub Load_cadastro_feito_parameter(ByVal parameter1 As String)
dt_cadastro_feito.Clear()
Dim cmd As New SqlCommand("Select * From cadastro_feito where codigobarra +
descricao + cast(mva_original as varchar) like '%" & parameter1 & "%'",
connSQLServer)
connSQLServer.Open()
dt_cadastro_feito.Load(cmd.ExecuteReader)
connSQLServer.Close()
cmd = Nothing
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Load_cadastro_feito()
DataGridView1.DataSource = dt_cadastro_feito
End Sub

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles


TextBox1.TextChanged
Load_cadastro_feito_parameter(TextBox1.Text)
DataGridView1.DataSource = dt_cadastro_feito
End Sub

Select * From contas_pagar3 where nome + cast (numeronfe as varchar) ilike '%" &
9600 & "%'

Select * From contas_pagar3 where nome + numeronfe like '9600'

Select * From contas_pagar3 where cast (numeronfe as varchar) = '9600'

Select * From contas_pagar3 where cast (numeronfe as varchar) like '9600'

Select * From contas_pagar3 where nome + cast (numeronfe as varchar) ilike '%" &
9600 & "%'

Select * From contas_pagar3 where numeronfe like '9600'


Select * From contas_pagar3 where 'O Baleiro Distribuidor de Balas Ltda' in
(nome,cast (numeronfe as varchar))

Select * From contas_pagar3 where '647294' in (nome,cast (numeronfe as varchar))


Select * From contas_pagar3 where '647294' in (nome,cast (numeronfe as varchar))

Select * From contas_pagar3 where @parameter1 in (nome,cast (numeronfe as varchar))

You might also like