
HELP! GPF in MSAJT200.dll while copying querydefs
Hi,
I really drive crazy by this problem! I have to to some db conversion an I
do this by copying all tables and qerydefs from one database to annother.
I use the following code:
For Each qdNew In dbNew.QueryDefs
Set qdOld = dbOld.CreateQueryDef(qdNew.name, qdNew.SQL)
Next qdNew
After a while I get an error "GPF in MSAJT200.dll at 0080:0875".
I'm not sure if it has something to do with that certain querydef, where
the error occurs. I also found the strange behavior, that some of the qd,
which were copied successfully, cannot be opened in design mode! They can
be executed, but when I try to open them in design mode in Access , I get
the message "Can't represent join <tbl1.a> = <tbl2.b>". That's really odd,
because the queries worked perfectly in then source db.
I suppose, its a bug in the query evaluator. These queries are a bit
complex, do a join between 6 to 10 tables. Some of the tables are attached
from another Access database and the correctness of the link information
is verified before.
The number of querydefs to copy is about 180. I used DoEvents and
DBEngine.Idles several times in several places with no success. So what
could it mean??
I use VB 4.0 16 Bit and an Access 2.0 database on a WinNT SP2 workstation.
MSAJT200.dll has version 2.50.1606.
Any suggestions?
Thanks in advance,
Peter Wildenhain