M
mike
I bought 3 books and spent weeks trying to add a record to
my database, but haven't figured it out??? I've tried both
sql and addnew method, but to no avail. Below is my sql
method. Any ideas would be highly appreciative.
<% @Language=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<%
Dim objConn, objRS, strQ
set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver
(*.mdb)};" & _
"DBQ=c:\home\mike\www\data\data.mdb"
objConn.Open
strQ = "INSERT INTO appointments (name) VALUES ('mike')"
objConn.Execute strQ
set objRS = objConn.Execute("SELECT * FROM appointments")
%>
<html>
<body>
<%
objRS.Close : objConn.close
Set objRS = Nothing : set objConn = Nothing
%>
</body>
</html>
my database, but haven't figured it out??? I've tried both
sql and addnew method, but to no avail. Below is my sql
method. Any ideas would be highly appreciative.
<% @Language=VBScript %>
<% Option Explicit %>
<% Response.Expires = 0 %>
<%
Dim objConn, objRS, strQ
set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="DRIVER={Microsoft Access Driver
(*.mdb)};" & _
"DBQ=c:\home\mike\www\data\data.mdb"
objConn.Open
strQ = "INSERT INTO appointments (name) VALUES ('mike')"
objConn.Execute strQ
set objRS = objConn.Execute("SELECT * FROM appointments")
%>
<html>
<body>
<%
objRS.Close : objConn.close
Set objRS = Nothing : set objConn = Nothing
%>
</body>
</html>