I am completely new to ASP and learning parts of it. I just want a simple example by which you create a form on web and submit values to database called DBTest.
'Establish new DB connection, this example uses MS Jet for Access DB
Set dbConn = server.CreateObject("ADODB.Connection"
dbConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\yourdatabase.mdb"
'Build the SQL Statement to insert (but could be update)
strSQL = "INSERT INTO yourTableName (Field1, Field2, Field3) VALUES ('" & request.form("Input1" & "', '" & request.form("Input2" & "', '" & request.form("Input3" & "'"
dbConn.Execute (strSQL)
'Could output some HTML here or redirect to another page to show successful process
%>
I haven't tested the above so apologies for any errors/typos but I hope you at least get the idea.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.