|
-
Aug 14th, 2009, 10:18 AM
#1
Thread Starter
Junior Member
Modify database from web page
I am using this code to write data from an access database in C: to an asp textbox (txtNam) in a web page. I´m searching it from a textbox named “txtCode” with a “Go” asp Button inside the same page.
Protected Sub btnGo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGo.Click
Dim oConnection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:WEBMTT.mdb")
oConnection.Open()
Dim oCommand As New OleDbCommand("SELECT * FROM Equipment WHERE Code='" & txtCode.Text & "'")
oCommand.Connection = oConnection
Dim oRedader As OleDbDataReader
oRedader = oCommand.ExecuteReader()
While oRedader.Read
txtNam.Text = oRedader.Item("Name")
End While
oConnection.Close()
End sub
How can I use another textbox and another button to change that field “Name” in that database from the web page?. I mean, doing the process backwards. The table’s name is “Equipment”. Thanks in advance
Last edited by principiante; Aug 14th, 2009 at 10:20 AM.
Reason: forgot something
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|