Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.
Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Dim connString As String = ConfigurationManager.ConnectionStrings("xls").ConnectionString ' Create the connection object Dim oledbConn As OleDbConnection = New OleDbConnection(connString) Try ' Open connection oledbConn.Open() ' Create OleDbCommand object and select data from worksheet Sheet1 Dim cmd As OleDbCommand = New OleDbCommand("SELECT * FROM [Sheet1$]", oledbConn) ' Create new OleDbDataAdapter Dim oleda As OleDbDataAdapter = New OleDbDataAdapter() oleda.SelectCommand = cmd ' Create a DataSet which will hold the data extracted from the worksheet. Dim ds As DataSet = New DataSet() ' Fill the DataSet from the data extracted from the worksheet. oleda.Fill(ds, "Employees") ' Bind the data to the GridView GridView1.DataSource = ds.Tables(0).DefaultView GridView1.DataBind() Catch Finally ' Close connection oledbConn.Close() End Try End Sub
|Checking a checkbox based on SQL DataReader boolean value in ASP.NET(VB)||2||32|
Error trying to export an asp.net Crystal Report:Method not found: 'Void CrystalDecisions.ReportApp
|run a stored procedure from vb.net||1||27|
|How to verify that an email address ends with a particular set of characters in C#?||2||27|