Jump to content
  • Revista PROGRAMAR: Já está disponível a edição #60 da revista programar. Faz já o download aqui!

Sign in to follow this  
security

Pesquisa.... nao sei!

Recommended Posts

security

boas mais uma x...

eu queria criar uma pesquisa em que por exemplo eu escrevo "sec" e o programa completa a palavra por exemplo com "security"

tenho o codigo feito mas diz-meque nao foram introduzidos um ou mais parametros!!!

o codigo e o seguinte:

Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
        Try
            If Len(TextBox4.Text) > 0 Then
                Dim mySelectQuery As String = "select Id_material,identificacao from tbl_material Where ID_material=" & TextBox4.Text
                Dim cmd As OleDbCommand = coNn.CreateCommand
                Dim myCommand As New OleDbCommand(mySelectQuery, coNn)
                coNn.Open()
                Dim myReader As OleDbDataReader = myCommand.ExecuteReader()
                If myReader.HasRows() Then
                    myReader.Read()
                    TextBox3.Text = myReader("identificacao")
                End If
            End If
        Catch exC As Exception
            MsgBox("Erro de leitura: " & exC.Message)
            Exit Sub
        Finally
            coNn.Close()
        End Try
    End Sub
End Class


"Innovation distinguishes between a leader and a follower." Steve jobs.

Share this post


Link to post
Share on other sites
security

deu-me jeito mas continuo com o problema do codigo estar a dar erro!!! :thumbsup:


"Innovation distinguishes between a leader and a follower." Steve jobs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.