Using Data Environment Designer with VB6-P SP6
- From: "henery" <NoSpam@xxxxxxxxxx>
- Date: Fri, 26 Aug 2005 09:41:47 -0700
Using XP-Pro SP2, fully updated (full auditing, nothing wrong in Event
Viewer). I only have have MDAC 2.8 SP1 installed. The database was created
using Access 2002 (10.6501.6735) SP3. And I'm using VB6 SP6.
My VB6 project is referencing Visual Basic for Applications, Visual Basic
runtime objects and procedures, Visual Basic objects and procedures, OLE
Automation, HTTP v1.0, Microsoft Data Environment Instance 1.0 (SP4),
Microsoft Data Binding Collection VB 6.0 (SP4), and Microsoft ActiveX Data
Objects 2.1 Library. Is anything wrong here?
Each database set up in the Designer usaes the Connection Source property:
Provider=Microsoft.Jet.OLEDB.4.0;Password=lotpotwg;Data
Source=C:\DB\DB1\MyDB.mdb;Mode=ReadWrite|Share Deny None;Persist Security
Info=True;Jet OLEDB:System database=C:\Documents and
Settings\Administrator\Application Data\Microsoft\Access\System.mdw;Jet
OLEDB:Database Locking Mode=3
The only difference is that one physical db is in the folder DB1 while the
other is in folder DB2, and the connection source property is set properly
for each as relates to the physical folder location path and filename. So
the "real" name of the two physical databases are both simply MyDB.mdb. They
both use user and password security, but no actual database password is set.
I'm having a problem referencing all tables in code using the declarations
created by using the ADO Data Environment Designer. I can connect to either
one of two identical databases residing in different local folders and with
them being defined in the Designer (MyDB1 and MyDB2). This code works
without throwing an error:
DE1.MyDB1.Open
DE1.MyDB2.Open
With the next code line being either
DE1.MyDB1.MyTable1 or it being
DE1.MyDB2.MyTable1A
then I can not access any tables in either database, and the immediate error
thrown is -2147217865 "The Microsoft Jet database engine cannot find the
input table or query "MyTable1" or MyTable1A". Am I doing this wrong? Am I
wrong by not first creating a new instance of the data environment that was
named DE1 in the Designer?
The above table names are those entered into using the Designer, the names
could not be identical for the tables in (nor for the fields of each
Designer defined table) even though the databases as defined in the Designer
each had different names (MyDB1 and MyDB2). Only the physical filename is
the same for each physical database, and their physical contents are
identical, but their table and field names (which the Designer can see) are
all unique even though they are identical in the physical databases.
I've done a LOT of web searching on this issue, and the only things I've
seen mentioned involved server timeouts. I'm just running everything local,
no remote server connection, so those things don't seem to apply. Another
interesting observation is that I'm able to drag and drop the field names,
from the Designer, of both databases onto a form. I'm not using this
functionality, but I can do it without an error being thrown but they do NOT
populate at runtime or at design time.
I know all the above is a lot of info, I provided it to try to be thourough
in providing configuration information so that it wouldn't have to be
guessed at by someone trying to help! Can anyone help me get past the error
I'm getting when I try to reference any table in an open database? I sure
appreciate any help I can get! TIA
.
- Follow-Ups:
- Re: Using Data Environment Designer with VB6-P SP6
- From: henery
- Re: Using Data Environment Designer with VB6-P SP6
- Prev by Date: ADO and querying an union
- Next by Date: Upper limit to data returned by an ADO recordset
- Previous by thread: ADO and querying an union
- Next by thread: Re: Using Data Environment Designer with VB6-P SP6
- Index(es):
Relevant Pages
|