0
   

datagrid view help in vb.net

 
 
brahmin
 
Reply Mon 24 May, 2010 03:27 pm
hi everyone. i have a technical question to ask.

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

Imports System.Data
Imports System.data.OleDb

Partial Class search
Inherits System.Web.UI.Page
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_Data\sh.mdb"
conConnection.Open()

Dim myDataAdapter As New OleDbDataAdapter(strSQL, conConnection)

myDataAdapter.Fill(myDataTable)
grdoutput.DataSource = myDataTable

conConnection.Close()
myDataAdapter.Dispose()
End Sub

End Class



can someone please help?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 905 • Replies: 1
No top replies

 
brahmin
 
  1  
Reply Mon 24 May, 2010 07:53 pm
no vb.net guys/girls here?

Does anyone at least know of a online source?
0 Replies
 
 

Related Topics

In How much time a website can be developed? - Question by aussiejumpingcastle
Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » datagrid view help in vb.net
Copyright © 2019 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 10/20/2019 at 05:06:09