CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Search By Name

  1. #1
    Join Date
    Jun 2009
    Posts
    1

    Search By Name

    Hi friends, I have a text box and a MSFlexgrid control in the form. If I enter a character in the text box, the corresponding rows should fetch from the SQL Server table and the name starts with the character (which was entered in the text box). I need a sample code using VB6.0 & ADO.

    Thanks

  2. #2
    Join Date
    Jul 2009
    Location
    Kuwait
    Posts
    170

    Re: Search By Name

    You need to use something like this
    Code:
    cmd = New OleDbCommand("select  xyz from tablename where  name= '" & textboxentry& "' '", cn)
    give the row name at xyz and the table name at tablename

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured