|
ASPDB: Database Editing with
A Million Options!
This page demonstrates the capabilities how
the third party component ASPDB from http://www.aspdb.com
makes database programming powerful and removes you worrying about how and
rather what it looks like. Here we will show the code to display a
gorgeous editable table by starting the component and setting dozens of properties:
filename=/learn/test/aspdb2.asp
<% response.buffer=true %>
<HTML>
<HEAD><title>ASPdb2.asp</title>
</HEAD>
<FONT FACE="Arial,Helvetica" Color=Black Size=3>
<%
Set MyDb = Server.CreateObject("AspDB.Pro")
MyDb.dbUnit = 1101
B=Request("ASPdbBut_1101") ' this is NOT case sensitive
L9=Left(B,9)
UL9=UCASE(L9)
L12=Left(B,12)
UL12=UCASE(L12)
if UL9 <> "ASPDBEDIT" then
response.write("<CENTER><B>Welcome to the ASP-db™ PRO Test Page.</B><P>")
response.write("For the benefit of others, please do not delete all of the records. Thanks.<P>")
response.write("<B>Click on the [Add New] button to see how ASP-db can put default values in certain fields.")
response.write("<HR WIDTH=66% Size=1>")
end if
' Is it an ASPdbEditUpdate? If so, show user the Name in the "current" record.
THISNAME = Session("ASPdb_1101_Name")
if UL12 = "ASPDBEDITUPD" then
MSG1 = "<CENTER><FONT SIZE=4 COLOR=Black><B>"
MSG1 = MSG1 + "Please Update the Information for: " + THISNAME
MSG1 = MSG1 + "</B></FONT><P>"
response.write(MSG1)
end if
if UL12 = "ASPDBEDITDEL" then
MSG1 = "<CENTER><FONT SIZE=4 COLOR=red><B>"
MSG1 = MSG1 + "You are about to DELETE all of the Information for: " + THISNAME
MSG1 = MSG1 + "</B></FONT><P>"
response.write(MSG1)
end if
if UL12 = "ASPDBEDITEDI" then
MSG1 = "<CENTER><FONT SIZE=4 COLOR=red><B>"
MSG1 = MSG1 + "You are about to EDIT all of the Information for: " + THISNAME
MSG1 = MSG1 + "</B></FONT><P>"
response.write(MSG1)
end if
Mydb.dbMDB = Server.MapPath("Pro-Demo.mdb") ' Has fields: Name, Age, Salary, NetWorth
MyDb.DBColor = "11,auto,white"
MyDb.dbGridTableTag = "border=3 cellspacing=3 cellpadding=3"
MyDb.dbFormTableTag = "border=3 cellspacing=3 cellpadding=3"
MyDb.dbGridDisplayFlds = "Name,Age,Salary,NetWorth"
MyDb.DbMode = "dual-horiz"
MyDb.dbGridInc = 10
MyDb.dbButtonAnchor=false
MyDb.dbExportFlds = "Name"
Mydb.dbFilterDropFlds = "Name,,People,Name,,,,,Distinct; Salary,,People,Salary,,,,,Distinct"
Mydb.dbEditDropFlds = "Salary,,,9250.75/11000/15000/21000/25000/32000/38000/44000/75000"
Mydb.dbEditFlds = "Name,Age[10],Salary,NetWorth[123]" ' added Name 07-27-98
MyDb.dbEditUpdateROFlds = "Name" ' ***** NEW!!!!! *****
EP = "TableName=People,BookMarkFlds=0,TableTag=Border=2"
EP = EP & ",RecordScope=single,CriteriaSize=4x25,EditSemiColon=;"
Mydb.dbEditParams = EP
MyDb.dbSQL = "Select * from People"
MyDb.dbMagicCell = _
"1, align=Left , <font size=2 face=ARIAL color=black><I><B>#1#</B></I>;" & _
"2, align=Center, <font size=2 face=ARIAL color=black> #2#;" & _
"3, align=right , <font size=2 face=ARIAL color=black>format=[currency];" & _
"4, align=right , <font size=2 face=ARIAL color=black>format=[currency];"
MyDb.dbImageDir="images/"
Mydb.dbNavigation="both"
Mydb.dbNavigationItem="Next, Prev, Gridrow, Filter, add, update, edit, delete"
Mydb.dbNavigationIcon="std"
MyDb.aspDBPro
set mydb=nothing
%>
</HTML>
 |  |  |
 |
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too.
a $5 tip buys him lunch at McDonalds,
a $20 tip buys his kid Hitoshi a new computer game,
a $39 tip buys his daughter Michiko a few nice outfits.
See our donor list.
|  |
 |  |  |
|
|
|
|