Added: May/27/2006 at 7:58am | IP Logged
|
|
|
i had the same problem before, the solution is easy
after opeing the connection u must start a transaction and before u close the connection u must end that transacation in order to save the data in the db
after :
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("webissuelogboek.mdb")
type:
Conn.BeginTrans
then before:
Set Conn = Nothing
type:
conn.CommitTrans conn.close
at the end ur code should look like this
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<p><img src="CDPC%20Logo%20Med.jpg" width="250" height="223"></p> <p> </p>
<% Dim Conn Dim Rs Dim sql 'Create an ADO connection and recordset object Set Conn = Server.CreateObject("ADODB.Connection") Set Rs = Server.CreateObject("ADODB.Recordset") 'Set an active connection and select fields from the database Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("webissuelogboek.mdb")
Conn.BeginTrans
'sql= "SELECT Satisfied1, Satisfied2, Satisfied3, Satisfied4,SomewhatSat1,SomewhatSat2,SomewhatSat3,SomewhatSa t4,Neutral1,Neutral2,Neutral3,Neutral4,SomewhatDis1, SomewhatDis2,SomewhatDis3,SomewhatDis4,Dissa1,Dissa2,Dissa3, Dissa4, Dtae, Student FROM TbIssue;" sql= "SELECT * FROM TbIssue;"
'Set the lock and cursor type Rs.CursorType = 2 Rs.LockType = 3
Rs.Open sql, Conn 'Open the recordset with sql query
Rs.AddNew 'Prepare the database to add a new record and add Rs.Fields("Satisfied1") = session("Satis1") rs.fields("Satisfied2")= session("Satis2") Rs.fields("Satisfied3") = session("Satis3") Rs.Fields("Satisfied4") = session("Satis4") rs.fields("SomewhatSat1")= session("SomSatis1") Rs.fields("SomewhatSat2") = session("SomSatis2") Rs.Fields("SomewhatSat3") = session("SomSatis3") rs.fields("SomewhatSat4")= session("SomSatis4") Rs.fields("Neutral1") = session("Neutro1") Rs.Fields("Neutral2") = session("Neutro2") rs.fields("Neutral3")= session("Neutro3") Rs.fields("Neutral4") = session("Neutro4") Rs.Fields("SomewhatDis1") = session("SomDisa1") rs.fields("SomewhatDis2")= session("SomDisa2") Rs.fields("SomewhatDis3") = session("SomDisa3") Rs.Fields("SomewhatDis4") = session("SomDisa4") Rs.Fields("Dissa1") = session("Disa1") rs.fields("Dissa2")= session("Disa2") Rs.fields("Dissa3") = session("Disa3") Rs.Fields("Dissa4") = session("Disa4") Rs.fields("Date") = Now() Rs.Fields("Student") = session ("Name")
Rs.Update 'Save the update %>
<% Rs.Close Set Rs = Nothing
conn.CommitTrans conn.close
Set Conn = Nothing response.redirect ("http://www.cdpc.net/issuelogboek/project.asp") %>
you have another problem, is the internal server error this page doenst show you the reall error you have to disbale it in order to give ou the reall erre and the line where it is happeing
to show the reall error follow the steps in the picture
and when u press OK
refresh the page, and whenever there is an error it will display the real error with the line where the error had accured
Hope this helps
Tell what happens with u
Best Regards
__________________ Firas S Assaad (TheGeek)
firas489@gmail.com
0096892166434
http://firas-thegeek.blogspot.com
|