|
xxx
Utility Belt:
SQLGenerateUpdate Demo
by Charles Carroll
The code below calls "Utility Belt" functions.
The Generate Update statement is one demo of Database "Utility Belt" functionality.
filename=/experiments/utilitybelt/vercurrent/ubdemo_SQLGenerateUpdate.aspx
<%@ debug="true" %>
<%@ Assembly src="utilitybelt.vb" %>
<script language="VB" runat="server">
dim ub1 as new learnasp.utilitybelt()
dim strConnect as string
Sub Page_Load(S As Object, E As EventArgs)
TRY
ub1.options("trace-on")
strConnect="\experiments\data\biblio.mdb"
DIM ht1 as new hashtable
DIM strSQL as string
ht1("table_name")="employees"
ht1("table_primarykey")="KeyEmployees"
ht1("table_primarykey_value")=27
ht1("firstname")="Ted"
ht1("lastname")="Smith"
ht1("city")="Pike's Peak"
ht1("state")="Colorado"
ht1("zip")="30897"
ht1("when")=DateTime.Now
strSQL=ub1.SQLGenerateUpdate(strConnect,ht1)
trace.write("strSQL",strSQL)
CATCH exc as exception
ub1.LogException("SUB Page_Load",exc)
END TRY
End Sub
</script>
<html><head>
<title></title>
</head>
<body bgcolor="#FFFFFF">
<form runat="server">
</form>
</body></html>
|