http://msconline.maconstate.edu/tutorials/ASPNET2/ASPNET03/aspnet03-06.aspx
Imports System.Data.OleDb
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim DBConnection = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("./Databases") & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited""")
DBConnection.Open()
Dim SQLString As String = "SELECT * FROM products.csv"
Dim DBCommand = New OleDbCommand(SQLString, DBConnection)
Dim DBReader As OleDbDataReader = DBCommand.ExecuteReader()
TextOut.DataSource = DBReader
TextOut.DataBind()
DBReader.Close()
DBConnection.Close()
End Sub
End Class
Sunday, February 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment