Hello All,
I want to store data into MS Access database without using DSN (Data Source Name). For his I have done the coding:-
<% dim stud1
set stud1=server.createobject("adodb.connection")
stud1.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("amitdatabase.mdb")
%>
<% dim stud2,stud3
set stud2=server.createobject("ADODB.Recordset")
stud3 = "SELECT tblComments.Name, tblComments.Comments FROM tblComments;"
stud2.CursorType = 2
stud2.lockType = 2
stud1.open stud2,stud3
%>
<%
stud2.addnew
stud2("firstname")=request.form("one")
stud2("lastname")=request.form("two")
stud2("email")=request.form("three")
stud2("username")=request.form("four")
stud2("password")=request.form("five")
stud2.update
%>
Using this coding I am unable to send data to database from the Form. And I also do not getting any error messages.
Anyone please help me to solve this problem.
Thanks