submitted data not updated promptly with ms access

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Please could you assist me on this query. i have to

complete this task the earliest time. i am not that

experienced in asp, but i manage more and less to

program basic functionalities....

i have included a form in my application. on

submission, i store the form typed data in an MS

ACCESS DATABASE. the number of inputs in the form is

not constant and the user is expected to alter his

choice. therefore, before writing to the database, i

first delete the previous data linked to that user,

then i write the new submitted data.

this basic op. works fine. however, if i change the

form content quickly, i see that the newly data is

not included. generally, i have found 15-20 seconds

enough time between 2 submissions to be both stored

in the database. i am using ISS on my local machine,

so i have not deployed it on a common public server.

the above inconvenient really annoys me, just

imagine the inconevenience that occurs especially

with high number of concurent users ....

i don't know if there a problem with my code, or

access...
i am attaching below my code

many thanks



===========================
<%


option explicit
%>

<html>
<head>
<title> Submit user selectiosn to Database</title>
<link rel="Style***" href="Style***.css"

type="text/css">
</head>

<body>
<h1>Submit the Changes to the Web Site Database</h1>

<%
Dim dbname, cnpath, connStr, sql, connect, rs
dbname = "userDb"
cnpath = "DBQ=" + Server.mappath(dbname)
connStr = "DRIVER={Microsoft Access Driver (*.mdb)};

" + cnpath

on error resume next
set connect =

Server.CreateObject("ADODB.Connection")
connect.open(connStr)
set rs = Server.CreateObject("ADODB.Recordset")

%>




<%


Dim N,Title
N=Session("TitlesNum")



sql = "Delete * from tbl_user where

tbl_user.Email ='" & Session("Email") & "'"
rs.open sql, connect,3,3

'rs.Close
'connect.Close
'connect.open(connStr)

sql = "Select * from tbl_user where tbl_user.Email

='" & Session("Email") & "'"
rs.open sql, connect,3,3


for i=1 To N
rs.AddNew


rs("Title") = request.form(Title)
rs.update
response.Write("update done ....")
NEXT



response.write("<P>Your preferences are now

stored")
rs.close
set rs=nothing
set connect=nothing
%>

<p><center><font size="5">
<a href="Home.asp">Home</a>

</body>
</html>


*** Sent via Developersdex http://www.developersdex.com ***
.


Quantcast