473,231 Members | 1,902 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,231 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 5297
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...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.