Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim connetionString As String
Dim connection As SqlConnection
Dim command As SqlCommand
Dim adapter As New SqlDataAdapter
Dim ds As New DataSet
Dim dv As DataView
Dim sql As String
connetionString = "Data Source=NASSQLEXPRESS;Database=data2;Integrated Security=True; Connect Timeout=30;"
sql = "Select * from Sfee where RegistrationNo='" & TextBox1.Text & "'"
connection = New SqlConnection(connetionString)
command = New SqlCommand(sql, connection)
adapter.SelectCommand = command
adapter.Fill(ds, "Sort DataView")
dv = ds.Tables(0).DefaultView
DataGridView1.DataSource = dv
Catch ex As Exception
Its working Perfectly,Plz reply me early
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: