Results 1 to 2 of 2

Thread: visual basic== help on searching

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2005
    Posts
    25

    visual basic== help on searching

    can i hav some examples on on how 2 search info from database
    and display to data grids? pls .. im almost out of time.

  2. #2
    Hyperactive Member fret's Avatar
    Join Date
    Sep 2004
    Posts
    472

    Re: visual basic== help on searching

    what kind of info do you need? like this one or not?
    VB Code:
    1. Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    2. 'cn is the SqlConnection
    3.         da.SelectCommand = New SqlCommand("select * from student where lastname = 'sikwate'", cn)
    4.         Dim dt As New DataTable()
    5.         da.Fill(dt)
    6.         Me.DataGrid1.DataSource = dt
    7.     End Sub

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