submitted data not updated promptly with ms access

T

tony

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="Stylesheet" href="Stylesheet.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>
 
B

Bob Barrows [MVP]

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

Already answered over in .db

Please do not multipost tony. This is definitely a database-related
question so .asp.db was the perfect group in which to post it. Posting it
here in .general as well did not increase your chances of getting an answer
(most of us
subscribe to both groups). On the contrary, if somebody had taken his time
to answer it here, only to find that it was already resolved in the other
group, that person may have been annoyed enough to ignore any future posts
from you, thereby decreasing your chances of getting help in the future.

There are times when you will not be sure which group is most appropriate
(again, this was not one of them), and you will want to post a question to
both groups. In that situation, you should use the cross-posting technique,
rather than posting the same message multiple times. To crosspost, put
a semicolon-delimited* list of the newsgroups to which you wish to post in
the To: header of your post and post it once. It, and any replies to it,
will appear in all the newsgroups in your list. So, if I reply in .asp.db,
my reply will also appear here in .asp.general.

* ... or whatever delimiter is recognized by your news client
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top