D
Dave
I am trying to get my form results posted into a table. I get the message
the information was submitted, but there is not anyhting in the table.
My Database = C:\MyDatabses\database.mdb
My Table = Results
The Results Table fields = last_name_field and first_name_field
I know I am close - can anyone help
Thanks
Dave
<html>
<head>
<%
'---------------------------------------------
'Set the connection to the database
strConn = "DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\MyDatabases\database.mdb;DefaultDir=;UID=;PWD=;"
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open strConn
'---------------------------------------------
'Open a specific table and assign the recordset
Set accessRS = Server.CreateObject("ADODB.RECORDSET")
sql_stmt = "SELECT * FROM [myTable]"
accessRS.Open sql_stmt, connection, 1, 2
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not accessRS.EOF Then
accessRS.MoveFirst
accessRS.Fields("last_name_field") = Request.Form("ELast")
accessRS.Fields("first_name_field") = Request.Form("EFast")
accessRS.Update
End If
%>
</head>
<body>
<p><font face="Arial" size="2">Your information has been submitted.</font>
</p>
</body>
</html>
the information was submitted, but there is not anyhting in the table.
My Database = C:\MyDatabses\database.mdb
My Table = Results
The Results Table fields = last_name_field and first_name_field
I know I am close - can anyone help
Thanks
Dave
<html>
<head>
<%
'---------------------------------------------
'Set the connection to the database
strConn = "DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\MyDatabases\database.mdb;DefaultDir=;UID=;PWD=;"
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open strConn
'---------------------------------------------
'Open a specific table and assign the recordset
Set accessRS = Server.CreateObject("ADODB.RECORDSET")
sql_stmt = "SELECT * FROM [myTable]"
accessRS.Open sql_stmt, connection, 1, 2
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If Not accessRS.EOF Then
accessRS.MoveFirst
accessRS.Fields("last_name_field") = Request.Form("ELast")
accessRS.Fields("first_name_field") = Request.Form("EFast")
accessRS.Update
End If
%>
</head>
<body>
<p><font face="Arial" size="2">Your information has been submitted.</font>
</p>
</body>
</html>