R
RoadKill
Okay, first off, our server doesn't seem to allow us to use the DRW or
FrontPage forms to connect to a database on our subwebs.
To get around that, I have coded my own forms. The problem I have is getting
the Timestamp to post to the Access database using the Insert command.
Any ideas?
Here is my code if that helps.
Thanks much!
<%@ Language = "VBScript"%>
<%
'Declare all local variables
dim conn
dim rs
dim strconn
dim strsql
strsql = ""
'set connection string to local variable-I use a DSN-less connection
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &
Server.MapPath("fpdb/ReviewForm.mdb")
'build the sql statement based on the input from the form
strSQL = "INSERT INTO NewResults(Supervisor, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8,
Q9, Q10, User_name, ReviewType, Center) Values('" &
request.form("Supervisor") & "', '" & request.form("Q1") & "', '" &
request.form("Q2") & "', '" & request.form("Q3") & "', '" &
request.form("Q4") & "', '" & request.form("Q5") & "', '" &
request.form("Q6") & "', '" & request.form("Q7") & "', '" &
request.form("Q8") & "', '" & request.form("Q9") & "', '" &
request.form("Q10") & "', '" & request.form("User_name") & "', '" &
request.form("ReviewType") & "', '" & request.form("Center") & "')"
'Set connection object
set conn = server.createobject("adodb.connection")
conn.open strconn
'Use the execute method of the connection object the insert the record
conn.execute(strSQL)
conn.close
set conn = nothing
%>
FrontPage forms to connect to a database on our subwebs.
To get around that, I have coded my own forms. The problem I have is getting
the Timestamp to post to the Access database using the Insert command.
Any ideas?
Here is my code if that helps.
Thanks much!
<%@ Language = "VBScript"%>
<%
'Declare all local variables
dim conn
dim rs
dim strconn
dim strsql
strsql = ""
'set connection string to local variable-I use a DSN-less connection
strconn = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" &
Server.MapPath("fpdb/ReviewForm.mdb")
'build the sql statement based on the input from the form
strSQL = "INSERT INTO NewResults(Supervisor, Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8,
Q9, Q10, User_name, ReviewType, Center) Values('" &
request.form("Supervisor") & "', '" & request.form("Q1") & "', '" &
request.form("Q2") & "', '" & request.form("Q3") & "', '" &
request.form("Q4") & "', '" & request.form("Q5") & "', '" &
request.form("Q6") & "', '" & request.form("Q7") & "', '" &
request.form("Q8") & "', '" & request.form("Q9") & "', '" &
request.form("Q10") & "', '" & request.form("User_name") & "', '" &
request.form("ReviewType") & "', '" & request.form("Center") & "')"
'Set connection object
set conn = server.createobject("adodb.connection")
conn.open strconn
'Use the execute method of the connection object the insert the record
conn.execute(strSQL)
conn.close
set conn = nothing
%>