[AccessD] AXP and Error 3310

DWUTKA at marlow.com DWUTKA at marlow.com
Tue Aug 10 16:07:25 CDT 2004


Sorry couldn't help out more.....

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Monday, August 09, 2004 11:40 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] AXP and Error 3310


Drew,

You also posted in Woody's Lounge, but I'll repeat some of my response
here for the archives.  

I have DoEvents in my code, and it makes no difference.  There was a Jet
4.0 issue mentioned in an MSKB article on A2k, but I haven't found
anything specific for AXP.  I'm assuming that this may be the culprit,
since the symptoms are quite odd, and once the error occurs, it will
keep occurring and continue for hundreds of recurrences.  Let me clarify
the situation:  when I said the same file was being imported repeatedly,
I may have misled you.  The same file is being unzipped to another
folder, the multiple text files imported from that folder into temporary
tables, and the temp folder cleared.  Then the data is moved from the
temporary tables to the main tables.  Then a timer starts and the next
check for files to import doesn't happen until the timer interval has
elapsed.

What appears to happen is that after several hundred reiterations of
this process, the data simply doesn't get imported and we get a log like
this:

Started at: 05:14  06-Aug-04
File successfully unzipped.
Warning: Application and Export File Version Difference!
Data Exported from Application Version: 4.19  Date: 17-Dec-2002
Data Imported into Application Version: 4.50  Date: 22-Apr-2004
Data updated to Temporary Tables
Data successfully loaded in Temporary Tables
There are no Well-related records remaining in this data import after
removing all Write-protected records.
Import aborted due to Unit Configuration errors in import file.
Completed at: 05:14  06-Aug-04
Elapsed Time: 0 mins 1 secs

The fact is, there is data in the comma-delimited text files, but it is
NOT loaded into the temporary tables this time, nor at any future time
until Access is restarted.  Instead, you get a series of 3310 errors:
"This property is not supported for external data sources or for
databases created with a previous version of Microsoft Jet."  The error
is meaningless in context, but there it is.  

There is nothing wrong with the import specs, since they work after
Access is restarted, but TransferText appears to break down entirely.
In fact, you can't even use it from the immediate window because you get
the same kind of error.  That "memory leak" type of behavior echoes the
reported problems with Jet 4 in A2k.  Unfortunately,  I can't find the
reference to that MSKB article at the moment (of course), so I can't be
more specific, and as I recall it was supposed to have been cured by one
of the earlier Jet 4 service packs.  


Charlotte Foust


-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com] 
Sent: Friday, August 06, 2004 1:17 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] AXP and Error 3310


Okay, did a little testing on my own, with Access 97.  Used the
following
code:

Dim i
Do Until i=-1
	docmd.TransferText .......
	i=i+1
	Me.lblStatus.Caption="Importing: " & i
	'DoEvents
Loop

Now, as is, above, the code Kicked up an 2051 error when i=11593 (It had
imported 46372 records).  Stopping the code, compacting the database,
repairing the database, nothing would let the code start up again
(without immediately kicking up that error message....which said
something along the lines of a dialog box was not clicked or
something.....), until I closed Access, and opened it up again, then it
started right back up.

Next time, it didn't error, it just hung.  It sat at a record level of
~120,000 for about ten minutes, then I just killed it.  No error, but it
was definitely failing.


Once I remove the quote before DoEvents, so that it would run, it seems
to just fly, with no stopping.  As I'm typing this, it's imported the
records 1.5 million times and still going.

Here's my theory.  Jet is multi-threaded.  I've had a little experience
with multi-threading VB projects.  One thing I know with doing that, is
you have to be EXTREMELY careful when accessing a database.  In fact, it
is almost mandatory to force only one thread to do db transactions.  If
two threads try db transactions 'simultaneously', all sorts of things
will happen (from just losing the thread, all the way to corrupting the
database....not kidding...).  The reason is that Windows isn't really
paying attention to what a thread is doing when it gives time to the
next one.  So if two threads hit the db at the right time, it can REALLY
get goofy.  

I'm sure the developers had that in mind when creating the TransferText
method, however, they also probably didn't count on someone importing a
file over and over and over, without a break.  So what is probably
happening, is that you are getting 'thread lock', where one or more of
Jet's threads are locked, and there is nothing you can do about it,
until you close Access, which will release the Jet threads.  Now, I
think putting in a DoEvents simply let's the VBA pause long enough to
let the Jet threads finish what they need too, before being called
again.

Hope this helps in someway.

Drew

P.S. (It's now at 1.78 mill and counting....with the DoEvents....)

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Charlotte
Foust
Sent: Thursday, August 05, 2004 4:49 PM
To: AccessD at databaseadvisors.com
Cc: Steve White
Subject: [AccessD] AXP and Error 3310


I'm beating my head against this and couldn't find anything in the
archives or the MSKB (they seem to never have heard of error 3310), so
I'm looking to you guys for assistance.  We have an app that does
nothing but watch a folder and import the files it finds there.  To
stress test it, we set it up with a single file (which is actually a zip
file containing a series of comma delimited text files, each compatible
with a table in the database structure) to import repeatedly.  The
import specs are there, and the thing behaves beautifully ... For a
while.  Then suddenly, after it has happily imported the same file
several hundred times, it loses its mind and starts throwing a 3310
error, "This property is not supported for external data sources or for
databases created with a previous version of Microsoft Jet" for each
text file in the archive.  Mind you, this is within 60 seconds of having
imported the thing before.  

After that, NO imports are possible in the database, even from the UI
until you close and restart Access.  Nothing else has changed, and the
database is not overly large.  It isn't an unhandled error somewhere,
because the module level and global variables are still populated.  I
can open the unzipped text files and see the data in them, but Access
can no longer import it, not even from the UI.  I'm not getting an Out
of Memory error or anything else, but I can step through the code and
see it break on DoCmd.TransferText.  We're running on XP but I can
replicate the behavior on Win2k and it is fairly consistent across
machines with different speeds and memory, although the details of
*when* it breaks vary slightly.

I have a restart functionality built, shelling out to a restart app, but
I want to know what's going wrong, not just paste a bandage on it.  Has
anyone else every encountered (and overcome) this?

Charlotte Foust
Infostat Systems, Inc.
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list