Drew Wutka
DWUTKA at marlow.com
Mon Oct 13 17:14:48 CDT 2003
Here's an ASP page I developed to directly edit a particular table I had in
Access. It wouldn't be difficult to modify this to any table.
<html>
<%
dim cnn
dim rs
dim i
dim strSQL
dim intCount
if request.Form("Submit")="Submit" then
set cnn=server.CreateObject("ADODB.Connection")
set rs=server.CreateObject("ADODB.Recordset")
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Open "E:\IntranetDLL\DynCorp\Air2000_be.mdb"
rs.Open "tblWebFields",cnn,1,3,512
intCount=rs.Fields.Count-1
rs.MoveFirst
do until rs.EOF=True
for i=1 to intCount
rs.Fields(i).value=request.Form(rs.Fields(0).value &
"-" & rs.Fields(i).Name)
next
rs.Update
rs.MoveNext
loop
rs.Close
set rs=nothing
cnn.Close
set cnn=nothing
end if
%>
<head>
<title>Dyncorp Field Settings</title>
</head>
<body>
<form name="FieldSettings" method=post>
<input type=submit name="Submit" value="Submit">
<table width="100%" border=1>
<%
set cnn=server.CreateObject("ADODB.Connection")
set rs=server.CreateObject("ADODB.Recordset")
cnn.Provider="Microsoft.Jet.OLEDB.4.0"
cnn.Open "E:\IntranetDLL\DynCorp\Air2000_be.mdb"
rs.Open "tblWebFields",cnn,1,1,512
response.Write "<tr>" & vbcrlf
intCount=rs.Fields.Count-1
for i=1 to intCount
response.Write "<td width=""" & 100/intCount & """>" &
rs.Fields(i).Name & "</td>" & vbcrlf
next
response.Write "</tr>" & vbcrlf
rs.MoveFirst
do until rs.EOF=True
response.Write "<tr>" & vbcrlf
for i=1 to intCount
response.Write "<td width=""" & 100/intCount & """>" &
vbcrlf
response.Write "<input type=""text"" name=""" &
rs.Fields(0).Value & "-" & rs.Fields(i).Name & """ value=""" &
rs.Fields(i).Value & """></td>" & vbcrlf
next
response.Write "</tr>" & vbcrlf
rs.MoveNext
loop
rs.Close
set rs=nothing
cnn.Close
set cnn=nothing
%>
</table>
<input type=submit name="Submit" value="Submit">
</form>
</body>
</html>
Drew
-----Original Message-----
From: paul.hartland at fsmail.net
To: dba-vb
Cc: accessd
Sent: 10/13/03 8:21 AM
Subject: [AccessD] [dba-VB] OT Learning ASP
To all,
I would like to start getting into ASP, I have done very little HTML so
really don't know where to start. We are going to transfer our main
booking database to SQL Server 7.0, and will be using this as a back-end
to an Intranet/Internet page. What I am really after is a way to create
a logon page that grants access via a user table, I think if someone
could give me some sample code to do this (i.e. designing the logon page
and connecting to the database to check the logins) I may be able to get
a better understanding before we go to far.
Also does anyone know any good books for this, I am currently
programming in VB/VBA on XP machines with a Windows 2000 server.
Paul Hartland
<<ATT140763.txt>> <<ATT140764.txt>>