On Apr 28 2005, 09:19 pm,
wizofaus@hotmail.com wrote in
news:1114737565.563075.108890@l41g2000cwc.googlegr oups.com:
[color=blue]
>
> Dimitri Furman wrote:[color=green]
>> On Apr 27 2005, 09:40 pm,
wizofaus@hotmail.com (Dylan Nicholson) wrote
>> in news:7d428a77.0504271740.269175a5@posting.google.c om:
>>[color=darkred]
>> > I have an application with two connections to the same Access DB.
>> > On one, I execute an "INSERT INTO", and immediately after, on the
>> > other, I execute a "SELECT", attempting to retrieve the record that
>> > was just added.
>> > But about 5% of the time, the SELECT retrieves 0 records.
>> > If I add a 500ms delay, it seems fine, but this isn't an acceptable
>> > solution for performance reasons.
>> > I've tried the same with SQL server, and no such problems arise.
>> > I'm using the "Microsoft Access Driver (*.mdb)" version
>> > 4.00.6304.00. I haven't made any calls that would allow the "insert"
>> > operation to run asynchronously, but it appears to be...or I suppose
>> > alternatively, the SELECT could be looking at an out-of-date cache
>> > (but these seems unlikely). Any clues?[/color]
>>
>> Take a look at
>>
http://msdn.microsoft.com/library/de...l=/library/en-
>>[/color]
> us/office97/html/adjustingwindowsregistrysettingstoimproveperforman ce.asp[color=green]
>>
>> especially the FlushTransactionTimeout setting. The article is for Jet
>> 3.5, but should be applicable to 4.0 as well.
>>
>> It seems that you use ODBC to get to the Jet database, therefore you
>> cannot use DBEngine.SetOption to change that setting on the fly, and
>> will need to make changes to the registry on the machine where your
>> app(s) are running.
>>[/color]
> I've tried adjusting all of FlushTransactionTimeout, SharedAsyncDelay,
> ImplicitCommitSync, UserCommitSync, tried it with and without explicit
> transactions (auto-commit mode on/off etc.), and all with no success.
> Assuming that is, that this can all be set via the ODBC connection
> string (I'm not using DSNs per se).[/color]
Are you saying that you are somehow including those settings in the
connection string? That definitely doesn't work.
[color=blue]
> I suspect it is something that maybe can only be controlled via the Jet
> engine interface directly, but we have no intention of changing the
> code this much.[/color]
Since you are not using DAO (as far as I can tell), you should try
adjusting those settings under the registry key mentioned in the MSDN link
I posted. This is an alternative to using DBEngine.SetOption in DAO. You
may need to look up details on the registry value types that have to be
created - they do not exist by default.
--
remove a 9 to reply by email