Solved

VC++, .MDB Files, ADO and ADOX programming

Posted on 2003-10-22
1
751 Views
Last Modified: 2013-11-27
I have a VC++ program in which I am using ADO and ADOX to open and create as need an Access .MDB file.  For the most part things are working fine.  However, I do have a problem that I will try to describe in general terms and see if I can get a solution.  If needed I can provided code snippets, etc.

The program works as follows as it starts and attempts to open the database:  

1.  If the database exists, everything opens and the program works fine from start to finish
2.  If the database does not exist, a create routine is called that creates the database, 3 tables, and a variety of indexes per table.
2a.  If I immediately stop the program at this point and restart it, the program works fine from start to finish.
2b.  If I continue to use the program and attempt something that accesses one of my Indexes, I get an ADO Exception that the Index does not exist in the database/table.  If I stop the program and use Access to open the database and the design tool, everything looks fine -- the tables and indexes are all there.  I can restart the program, attempt the same procedure as before to access the Index and all works well.

Any ideas why this would be happenning -- when the Index would not be seen after getting Appended to the table?  I'm using MDAC 2.6 and I've checked to make sure that I am appending and releasing everything in the create routine before calling the open routine to finish the process.
0
Comment
Question by:markparr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
jadedata earned 100 total points
ID: 9600470
Hey! markparr,

  It sounds like VC++ is over-running Access's ability to get the system tables adjusted before launching into usage of those objects.

  Try "reigning in" the program for a few milliseconds to allow the ADO engine to finalize the system table updates before proceeding to use the new objects.  

regards
Jack
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question