473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

connection.execute = asynchronous process ??

Hi,
I'm using an access database and found following problem :

I have a table X with 2 records : record 1 & record 2. I execute following
procedure with 2 steps :
1. The procedure deletes records 1 : connection.execute "delete from X
record 1"
2. The procedure adds record 1 again using the recordset object.

Result : nothing happens !
I have the feeling that the "delete" statement is executed AFTER the "add
record" statement. Or the "delete" statement did not finish before the
start of the "add record" statement (= asyncrhonous processing).

Can somebody explain me this behavior ?
I have this problem only when using a MS Access database and not with an MS
SQL database.

Jill
Jul 19 '05 #1
4 5308
Can you show your code?

Ray at work

"Jill Graham" <ji**********@yahoo.com.au> wrote in message
news:ew**************@tk2msftngp13.phx.gbl...
Hi,
I'm using an access database and found following problem :

I have a table X with 2 records : record 1 & record 2. I execute following procedure with 2 steps :
1. The procedure deletes records 1 : connection.execute "delete from X
record 1"
2. The procedure adds record 1 again using the recordset object.

Result : nothing happens !
I have the feeling that the "delete" statement is executed AFTER the "add
record" statement. Or the "delete" statement did not finish before the
start of the "add record" statement (= asyncrhonous processing).

Can somebody explain me this behavior ?
I have this problem only when using a MS Access database and not with an MS SQL database.

Jill

Jul 19 '05 #2
On Fri, 3 Oct 2003 17:15:36 +0200, "Jill Graham"
<ji**********@yahoo.com.au> wrote:
Hi,
I'm using an access database and found following problem :

I have a table X with 2 records : record 1 & record 2. I execute following
procedure with 2 steps :
1. The procedure deletes records 1 : connection.execute "delete from X
record 1"
2. The procedure adds record 1 again using the recordset object.

Result : nothing happens !
I have the feeling that the "delete" statement is executed AFTER the "add
record" statement. Or the "delete" statement did not finish before the
start of the "add record" statement (= asyncrhonous processing).

Can somebody explain me this behavior ?
I have this problem only when using a MS Access database and not with an MS
SQL database.

Jill


I think your going to have to explain this a little better. You say
you use Access, but also refer to a procedure. Is the Procedure
something in ASP?

Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: conn.execute "INSERT INTO X (a,b,c) VALUES (1,2,3)"

This kind of thing should work. The normal action of the connection
object is NOT asynchronous, so I doubt that is your problem.

When you say nothing happens, does the first record get deleted? Does
the new record not get added?
Jul 19 '05 #3
Hi Dan,

Correct, this is a procedure in ASP

Table X has two records : ID = 1 and ID = 2

The procedure is as follows :
Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: rs.open "table X", <options>
rs.addNew
rs("ID") = 1
rs.update
rs.close

Result of the procedure : the record is deleted (step 1) but step 2 has no effect.

When I replace step 2 with following statement : conn.execute "INSERT INTO X (ID) VALUES (1)", then everything works fine.

Why doesn't the recordset work ?

"Dan Brussee" <db******@NOSPAMnc.rr.com> wrote in message news:4h********************************@4ax.com...
On Fri, 3 Oct 2003 17:15:36 +0200, "Jill Graham"
<ji**********@yahoo.com.au> wrote:
Hi,
I'm using an access database and found following problem :

I have a table X with 2 records : record 1 & record 2. I execute following
procedure with 2 steps :
1. The procedure deletes records 1 : connection.execute "delete from X
record 1"
2. The procedure adds record 1 again using the recordset object.

Result : nothing happens !
I have the feeling that the "delete" statement is executed AFTER the "add
record" statement. Or the "delete" statement did not finish before the
start of the "add record" statement (= asyncrhonous processing).

Can somebody explain me this behavior ?
I have this problem only when using a MS Access database and not with an MS
SQL database.

Jill


I think your going to have to explain this a little better. You say
you use Access, but also refer to a procedure. Is the Procedure
something in ASP?

Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: conn.execute "INSERT INTO X (a,b,c) VALUES (1,2,3)"

This kind of thing should work. The normal action of the connection
object is NOT asynchronous, so I doubt that is your problem.

When you say nothing happens, does the first record get deleted? Does
the new record not get added?



Jul 19 '05 #4
Is there an On Error Resume Next in your code? If not, what does your real
code look like?

Ray at work

"Jill Graham" <ji**********@yahoo.au.com> wrote in message
news:eS**************@TK2MSFTNGP11.phx.gbl...
Hi Dan,
Correct, this is a procedure in ASP
Table X has two records : ID = 1 and ID = 2
The procedure is as follows :
Step 1: conn.execute "DELETE FROM X Where ID = 1"
Step 2: rs.open "table X", <options>
rs.addNew
rs("ID") = 1
rs.update
rs.close
Result of the procedure : the record is deleted (step 1) but step 2 has no
effect.
When I replace step 2 with following statement : conn.execute "INSERT INTO X
(ID) VALUES (1)", then everything works fine.
Why doesn't the recordset work ?
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
4
by: Mike Dole | last post by:
I'm working on a client - server application based on the 'How to Sockets Server and How to Sockets Client' code from the Visual Basic ..NET Resource Kit. Since I want to be able to send 'big...
3
by: Stephanie | last post by:
I have a problem that I am trying to solve. We have a huge product with a whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by ASP app. When I attempt to add features or fix...
0
by: Prodip Saha | last post by:
http://www.aspnet4you.com/Articles.aspx?ArticleID=5017 Asynchronous Data Access in ASP.NET (Live demo) Author: Saha,Prodip Posted:5/15/2005 6:03:17 PM Web Architecture is becoming...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
1
by: Jac | last post by:
Hey, How can I test if there is an connection-exception when using database application block from the enterprise service? I stopped the sqlserver. I do now the following : Database db =...
2
by: Nicolas Le Gland | last post by:
Hello everyone here. This is my first post in this newsgroup, I hope I won't be to much off-topic. Feel free to redirect me to any better group. I am getting strange timing issues when...
167
by: darren | last post by:
Hi I have to write a multi-threaded program. I decided to take an OO approach to it. I had the idea to wrap up all of the thread functions in a mix-in class called Threadable. Then when an...
2
by: Varangian | last post by:
my question is when to use Asynchronous Pages and when to not? Considering their advantage of not locking the UI thread for a particular process whether long or not, I might think that it is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.