You forgot to open the Connection first. All you do is define a Connection object and a connection string, but you don't tie the two together and open the connection. Try this:
set con=server.createobject("ADODB.connection")
connString="Driver={Microsoft Access Driver (*.mdb)};Dbq=" & path
sql="delete from tabla1 where f_name='"&request.form("firstname")&"'"
con.Open connString
con.execute (sql)
More info:
http://msdn.microsoft.com/en-us/library/ms807027.aspx
Also, be aware your code is open for SQL Injection. If Request.Form("firstname") contains:
Imar';DELETE FROM tabla1; SELECT FROM tabla1 WHERE 'A' = 'A
you end up with an empty tabla1 table..... ;)
Searching Google for SQL Injection shows you more about this hacker's tool....
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.