Hiyya, can anybody pls help me out wif dis asp codes? I found no error wif it... but the fact tad the information keyed in cannot be saved to the database is killing me... could anybody pls tell me wad else could be wrong? below is the codes...
<%
dim err
dim conn
dim rs
dim strBuffer1,strBuffer2
dim varDatabaseName
dim sql
varDatabaseName="db2.mdb"
strBuffer1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= "
strBuffer2 = server.mappath(varDatabaseName)
set conn = server.createobject("ADODB.connection"
conn.connectionstring = strBuffer1 & strBuffer2
conn.open
set rs = server.createobject("ADODB.recordset"
rs.open "friens", conn, adLockOptimistic, ,adCmdTable
rs.AddNew
rs("FirstName"=Request.Form("FirstName"
rs("LastName"=Request.Form("LastName"
rs("Gender"=Request.Form("Gender"
rs("Age"=Request.Form("Age"
rs("Email"=Request.Form("Email"
rs.Update
response.write "can be save"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
the page will print me "can be saved" but then there is no data stored in the database. i m using microsoft access btw.. thanx...
<%
dim err
dim conn
dim rs
dim strBuffer1,strBuffer2
dim varDatabaseName
dim sql
varDatabaseName="db2.mdb"
strBuffer1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= "
strBuffer2 = server.mappath(varDatabaseName)
set conn = server.createobject("ADODB.connection"
conn.connectionstring = strBuffer1 & strBuffer2
conn.open
set rs = server.createobject("ADODB.recordset"
rs.open "friens", conn, adLockOptimistic, ,adCmdTable
rs.AddNew
rs("FirstName"=Request.Form("FirstName"
rs("LastName"=Request.Form("LastName"
rs("Gender"=Request.Form("Gender"
rs("Age"=Request.Form("Age"
rs("Email"=Request.Form("Email"
rs.Update
response.write "can be save"
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
the page will print me "can be saved" but then there is no data stored in the database. i m using microsoft access btw.. thanx...