473,396 Members | 1,786 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,396 software developers and data experts.

Asynchronous ODBCdirect queries

dsatino
393 256MB
Ok, I'm not going to post any code at this point because there's a lot and I'm pretty sure my break point is caused outside of the module it's showing in.

I have a local table that is a line item collection of related data from multiple sources. I'm trying to update this table using up to 7 asynchronous queries. In other words 7 queries simultaneously updating 1 table. None of the queries will ever try to update the same piece of data so I thought I could get away with this. I'm also not reusing any variables for workspaces, connections, or recordsets so that shouldn't be a problem.

I am using the same variable for the local recordset that's being updated though.

Most of the time, I get an error that says:

"A different operation is preventing this operation from being executed"

Am I trying to do too much? Am I missing something conceptually? If anyone has any ideas or can give me a general once over on the ins and outs of asynchronous queries that would be great.

Thx
Jun 14 '10 #1
4 2594
TheSmileyCoder
2,322 Expert Mod 2GB
By simultaneous you mean they run at the same time? Not one after the other? How do you even make them run like that?
Jun 14 '10 #2
dsatino
393 256MB
You need to set up multiple odbcDirect workspaces. As long as each is operating in its own space, you can run them asynchronously.

I should clarify though that these are DAO recordsets based on select queries and are not any type of action queries.
For Example:

With odbc1
set rstEX=cnxABC.OpenRecordset("Select Field1, Field2, etc.",dbopendynamic, dbrunasync)
End with

With odbc2
set rstEX2=cnxABC2.OpenRecordset("Select Field1, Field2, etc.",dbopendynamic, dbrunasync)
End with

I'm then running a Do Until .eof Loop on each recordset and comparing it to values in my local recordset. I'm running 7 of these simultaneously, at least. These 7 asynch queries are embedded in another loop that runs twice (with different parameters on the second pass) so it's possible that more are open.

Actually, now that I write this I realize it may be failing because i'm not pausing the operation so that the second loop can't start before the first one ends and I may be killing my first attempt by trying to start the second.

I'll let you know if I can get this to work...
Jun 15 '10 #3
TheSmileyCoder
2,322 Expert Mod 2GB
I still have no usefull advice to give :P, however I am curious as to why you need to run them in such a way, and not simply one after another?
Jun 15 '10 #4
dsatino
393 256MB
Need? Need,you ask.

Why does Germany need a fresh central forward in a 3-nil game against a 10-man side?

Because 4-nil is simply better.

Or, in my case, because 30 seconds of processing is better than 3 minutes of processing.

:)

All joking aside, I obviously don't really need to do this. I'm simply trying to push the boundaries of my own programming capabilities.
Jun 15 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gary | last post by:
I'm using ASP (VB Script) to generate some reports from a SQL Server database. These queries often take a significant amount of time to complete, and many of these reports consist of multiple...
6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
0
by: Zach Tong | last post by:
Hi all, I've got a minor problem that I think deals with synchronization. I've got asynchronous socket code working on my server. When it recieves a command, it will call the follow function to...
20
by: Darryl Kerkeslager | last post by:
I use the following code to retrieve to recordsets into two local tables, from an mdb file over a WAN. Works fine, but I'm trying to tweak the speed, and I have some questions: 1. I tried both...
8
by: PC Datasheet | last post by:
If a subroutine runs twelve action queries, will they run one-at-a-time where one finishes before the next one starts or will one or more run simultaneously? If they don't run one-at-a-time, how...
4
by: Michael C | last post by:
Hi all, Is there an easy way to get the parameters of an asynchronous delegate call from the callback function? Here's an example of what I'm trying to do: private delegate ArrayList...
3
by: usenetaccount | last post by:
In a newly created test app, to maximize client performance I tried to make two SOAP method calls in tandem (the soap methods execute some specified query), as each call includes a large amount of...
0
by: Bishoy George | last post by:
Hi, I have a asp.net 2.0 web application. I want to implement the asynchronous model through http handler in web.config ...
6
by: Ralph | last post by:
Hi How can I make several asynchronous XMLHttpRequest queries? The one thought I have is to have few XMLHttpRequestObjects and send queries using them alternately. But what if i don't know how...
0
by: mbrierst | last post by:
Is it at all possible to do asynchronous SQL queries with Visual Studio 2003 / .NET version 1.1? I know this can be done with VS 2005 .NET 2.0, but that's not an option for me right now. Is there...
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: 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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.