Hi guys,
I here teaching my self some asp using w3schools.com. I typed all the code on the page ( that should allow me to enter a record into a table, but for the love of me the thing not working.
if it's possible could someone tell me where i went wrong
Thanks much in advance
I here teaching my self some asp using w3schools.com. I typed all the code on the page ( that should allow me to enter a record into a table, but for the love of me the thing not working.
if it's possible could someone tell me where i went wrong
Code:
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Inetpub\[URL unfurl="true"]wwwroot\database.mdb"[/URL]
sql="INSERT INTO table (name,id,"
sql=sql & "age)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("name") & "',"
sql=sql & "'" & Request.Form("id") & "',"
sql=sql & "'" & Request.Form("age") & "')"
on error resume next
conn.Execute sql, recaffected
if err<>1 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
Thanks much in advance