Binding a textbox from a access query
Posted on 2011-09-15
As much as I hate access, I am stuck creating a web page into the database. I popluate the DB just fine, and now want to show the results page but not using the standard asp.net controls, as I need to move the data around to a printer friendly form that they are used to. My thoughts were creating another form in the results page with textbox's and binding the textbox's with the recordset that they just entered. I am half way there, with using a protected sub on load, that pulls the recordset, however, does access utilize a datareader like SQL? this is the code I started but having no luck on the finish side:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=d:\LeadSheets\App_Data\DB.mdb")
Dim qry As String
Dim cmd As OleDbCommand
qry = "SELECT * FROM [Jobs] WHERE ([Job No] = @NewJob)"
cmd = New OleDbCommand(qry, conn)
TextBox1.Text = ????????
Textbox2.text = ???????