473,769 Members | 7,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I wait for a query to complete?

First, thanks Wayne Morgan, Cost Budde, and Saintor for all the help
you've been in getting me through the field of hidden mines in Access.
Most of the program now works, so hopefully I am nearing the end of my
(immediate) questions.

Since this is a bit of a high-level question, first a few words about
what I am (trying to) do. This is an AI medical diagnostic program,
that takes free-form natural language patient statements regarding all
of their health problems, extracts specific usable details, matches
them to known possible conditions, identifies questions to separate
the candidate conditions, extracts search words for medical databases,
etc.

Early appearances suggest that this program may be able to provide
better primary diagnostic health care than is usually available from
overworked live doctors! The program may not be as smart, but it is
MUCH more patient, has a better memory, and is thorough to a fault.

This is currently written in Access 97 so that porting to other
platforms will be as easy as possible. When (if?) this stabilizes, I
plan to convert it to VB playing against an Access MDB. This program
may then find its way to a web site if it doesn't turn out to be too
slow.

The guiding methodology throughout has been to use complex VBA
functions in queries to not only compute an output field (that is
often simply ignored, or just used for debugging), but to also
accumulate internal statistics to be used for the next phase of
analysis. For example, it accumulates the symptoms associated with
various high-ranking candidate conditions that a patient did NOT
mention, so the patient could be asked about these.

Yes, I've already observed some of the interesting "flakes" in this
approach, like SQL liking to look at the same record more than once
during a query. This hasn't caused (significant) problems, because
there is plenty of logic to reject duplicates throughout the program.

My fundamental logic seems to be holding together from end to end, but
I'm now having some interesting challenges with the platform.

My immediate problem is that I haven't yet found a reliable way to be
sure that a query has completed. I can put in a few DoEvents after
firing off a query and at least the simple stuff works. However,
debugging has been rather difficult, because setting a breakpoint in
one of the functions called by SQL simply stops the query while the
program continues on to "jump to confusions" without the full results
of the query.

I suppose that I could simulate the queries in DAO code, but that
seems to be a stone age solution to this problem. I suspect that one
of you gurus has a MUCH more elegant approach.

Do you have any thoughts, ideas, suggestions, commizerations,
castigations, curses, etc?

Thanks again.

Steve Richfield
Nov 13 '05 #1
2 3672
Steve Richfield wrote:
Early appearances suggest that this program may be able to provide
better primary diagnostic health care than is usually available from
overworked live doctors! The program may not be as smart, but it is
MUCH more patient, has a better memory, and is thorough to a fault.
I take it this will be of assistance to a doctor, not to a patient
without a doctor? The human expert can be relieved of all rote knowledge
access, and all 'standard' logic; but nothing can replace overview and
intuition as it is present in humans. I think.

I am very glad to see an application of AI here. I did a university
study in the field, but chose my work in other directions.
This is currently written in Access 97 so that porting to other
platforms will be as easy as possible. When (if?) this stabilizes, I
plan to convert it to VB playing against an Access MDB. This program
may then find its way to a web site if it doesn't turn out to be too
slow.
Have a side eye to other (SQL-like) database backends; currently I am
using DB2 with PHP as data retrievers for a web interface. But that is
quite OT here :-)
[...] to also accumulate internal statistics to be used for the next phase of
analysis.
Remark from the maybe-not-so-nice category: it may be worth the trouble
taking these operations out, and to put them in a separate query.
Procedure. Whatever.
My immediate problem is that I haven't yet found a reliable way to be
sure that a query has completed.
I can read this in two ways. Either an action query processes the last
record (that should be noticable) or a view (SELECT query, if you wish)
is done calculating the last record--in visible view, that is.
"jump to confusions"
ROTFL wonderful
I suppose that I could simulate the queries in DAO code, but that
seems to be a stone age solution to this problem. I suspect that one
of you gurus has a MUCH more elegant approach.


Nah, but if you don't simulate them but stimulate them from code? VBA
won't step over a currentdb.execu te("queryname" )

The presence of side effects should warn you that you possibly need
separate routines. I'd be glad to offer detailed help (offline probably).
Nov 13 '05 #2

"Bas Cost Budde" <b.*********@he uvelqop.nl> wrote in message
news:cm******** **@news2.solcon .nl...

I am very glad to see an application of AI here. I did a university study
in the field, but chose my work in other directions.


[Translation: "I am currently cleaning the computer science lab on nights
and weekends."]
Nov 13 '05 #3

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

Similar topics

11
20364
by: Peter Kirk | last post by:
Hi there I am looking at using a thread-pool, for example one written by Jon Skeet (http://www.yoda.arachsys.com/csharp/miscutil/). Can anyone tell me if this pool provides the possibility to wait for all its threads to finish? For example, if I start 20 threads: CustomThreadPool pool = new CustomThreadPool("PetersThreadPool"); ThreadMethod m = new ThreadMethod(InsertThread);
6
1884
by: Paul | last post by:
Hi just wondering if there is a way to set up a wait for object in vb.net as if a put a delay in between the fill and the databind things work ok, but if not the page is reloading without the updated information,(stored procedure is taking too long to complete). the time needed for this delay will change depending on the time the "stored procedure" which will vary, takes to excecute. dataadapter.Fill(dataset, "stored procedure") 'fill...
6
5712
by: Jeremy Chapman | last post by:
I have a button on my page which when clicked redirects to another page. on the page load of the page that I've redirected to, there is a long query. What I want to do is with dhtml, display test in the center of the screen saying 'please wait..' so that the text displays until the new page is returned. My problem is that the html is not visually updated because the browser is busy waiting for the http request to complete. Is there any...
4
7934
by: Shelby | last post by:
Hi, if I launch another application in my vb code, how can I wait for it to complete first? Dim myProcess As Process myProcess = New Process myProcess.Start("test.exe") ' I want to wait for test to complete and continue with other codes myProcess = Nothing
12
5275
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock block protecting a resource. Thread 2 and 3 also have a SyncLock block protecting the same resource and after executing some code in their blocks they both do a Monitor.Pulse to hand of the locked resource back to thread 1. While thread 1 has...
16
30074
by: Thirsty Traveler | last post by:
I would like to create a test harness that simulates multiple concurrent users executing an individual thread. I would like this to be determined at runtime when the user specifies the number of desired threads. When this is kicked off, I would like to wait in the primary thread until all worker threads have completed and time the result... one problem... I can't figure out how to wait for all threads to complete prior to updating my...
1
8619
by: Damien Byrne | last post by:
Hello, I am new to python. I am using the os module to run a command in a bashshell. However I need this process to complete before continuing. Is there a command that will wait for this process to complete? I am using Windows XP and the os.wait() command only works for UNIX systems, and therefore doesn't work. My code is as follows:
7
3943
by: josh | last post by:
Hi, I'm trying to write some code to show a little div (with an image is sayng is loading...) that is showed when the page is loading... the events I can use are onbeforeunload, onunload and onload but with that the code does not work! are there a solution to show a little div while the page is loading and then make it to disappear when the page is loaded?
25
4686
tusovka
by: tusovka | last post by:
Because Firefox and IE render web pages differently, I cant get the same results. I working with many embedded tables that contain javascript functionality inside. What I have is a table that contains radio buttons. Once the user selects a button, I use the onClick functionality to generate 2 dynamic selectors that are inserted once results come back from DataBase. I want to display a simple message (Query in progress) until the...
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9865
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7410
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6674
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3963
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.