177
asP.net
</asp:Repeater>
</form>
</body></html>
6.2.10.3 Update Database Listing6.24 (ADOUpdate.aspx) is an example of data-
base updating using ASP.NET with ADO.NET. Again, note the SQL string in bold
and the use of the quotation marks in particular.
Listing6.24: Update Database Using ADO.NET (ADOUpdate.aspx)
<%@ Page Language="VB" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
Public Sub Page_Load()
End Sub
Public Sub Updating(sender As Object, e As EventArgs)
Dim StudentID As String
Dim NewAddress As String
StudentID = textbox1.Value
NewAddress = textbox2.Value
Dim sql As String
Dim dbconn=New OleDbConnection _
("Provider=Microsoft.ACE.OLEDB.12.0; data source=" & _
server.mappath("StudentDB.accdb"))
dbconn.Open() ...