here is a test code that I'm tring to use to see if I can insert into my database. (I can select from the database.)
I'm new to asp and not sure what I'm complete doing.
I was able to create several retrieval screen now I need to work on insert and update.
currently using access 2000
( sql server will be the final db)
the table has two columns ( ID(autonumber) , and name)
ID is the PK.
-----------------
when I refresh the page in IE, I don't see any error nor do I see the response.write , not sure if it runs.
-----------------
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.open(server.mappath("\db\database.mdb"))
sql="INSERT INTO tblGameOwners ( Name ) Values ('twerwe');"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
---------------
I'm tring to get this plan code to work , due to the "required.object server" error msg from my other less plan asp page .
TIA
Tim
I'm new to asp and not sure what I'm complete doing.
I was able to create several retrieval screen now I need to work on insert and update.
currently using access 2000
( sql server will be the final db)
the table has two columns ( ID(autonumber) , and name)
ID is the PK.
-----------------
when I refresh the page in IE, I don't see any error nor do I see the response.write , not sure if it runs.
-----------------
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.open(server.mappath("\db\database.mdb"))
sql="INSERT INTO tblGameOwners ( Name ) Values ('twerwe');"
on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permissions!")
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
conn.close
%>
</body>
</html>
---------------
I'm tring to get this plan code to work , due to the "required.object server" error msg from my other less plan asp page .
TIA
Tim