E:\web\learnaspcom\htdocs\freebook\learn\ubtoc.xml LearnAsp.com - ASP ASP.net Free Lessons
Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll
<Asp.net blog>
<personal site>
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

<Test Script Below>


<%@ 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>
Chaz Wish List
Tall Tip $5
Grande Tip $20
Venti Tip $39
Tip Jar Thanks
2004 Thanks
2005 Thanks
HUGE Tip -love site