Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
hi everyone. i just joined.
i have run into a problem while doing a search program. please help me.
i am trying to search a database and return the results in a datagrid view. my webform contains a text box txtsearch and a button btnSearch and a datagrid view grdoutput. the problem is i can not get anything to display. here is the code
Partial Class search
Dim myDataTable As New DataTable
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Dim strSQL As String
strSQL = "select Pin from Credentials where Gpa > " & txtSearch.Text & ""
Dim conConnection As New OleDbConnection
conConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=" & System.AppDomain.CurrentDomain.BaseDirectory() & "App_Datash.mdb"
Dim myDataAdapter As New OleDbDataAdapter(strSQL, conConnection)
grdoutput.DataSource = myDataTable
can someone please help?