Solved

MFC with MS Access - Login data source dialog

Posted on 2006-07-03
5
377 Views
Last Modified: 2006-11-18
I'm working with a big software about security digital recorder base on camera images. We need to detect what object is in the current camera image. It's developed base on VC6, MFC. If the object is a car, we will increase a counter and write that value into MS Access database at the same time. In one second, the database writer can work more than 13 times. Now, there is a bug in my part but I don't know the reason. I let the software run through nights to test it. After about 2 days, at 12 PM, the software pops up a data souce login dialog. It looks like the following:

______________________________________________________________________
| Login                                                                                                                |
|_____________________________________________________________________|
|                                                                                                                         |
|   _Data Souce____________________________                    OK button                 |
|   |                                                                 |                                                  |
|   |_____________________________________|                   Cancel button            |
|                                                                                                                         |
|   _Authoriation____________________________                                                  |
|   |                                                                  |                 Database... button      |
|   |  Login name: (login name textbox)                |                                                 |
|   |  Password   : (password textbox)                  |                 Help button                |
|   |______________________________________|                                                 |
|                                                                                                                          |
|______________________________________________________________________|

I put TRY{}CATCH_ALL{} whenever connect, open and excute query and write to log file. When the dialog appears, there is nothing write out to log files. It means the exception can't be thown out from my software. I tested with MS access 2002 and 2003, it rarely happens on access 2003. I checked all my code and don't know the reason why. Whether some thing about MS Access regarding to this dialog box that I don't know? This dialog box appears putting the software in dangerous state. If end-user press Cancel button, the software can be crashed. It's really critical.
I hope that I will receive some solutions from all of you.
Thanks very much.
0
Comment
Question by:nthnhung
[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
  • 2
5 Comments
 
LVL 84
ID: 17036645
If the software is asking you to login again, I would suspect that would mean that you are losing your connection to the Access database. This could be a result of a network problem (is the database located on the same machine as the program), or something that's happening on the machine (like a scheduled task which tries to backup the db, which could cause your program to fail to communicate).

Any reason you're using a DSN instead of connecting directly with the DAO or ADO library? I admittedly don't know much about MFC or VC6, but typically you connect to a Access/Jet db via those methods instead of through a DSN.
0
 
LVL 1

Author Comment

by:nthnhung
ID: 17040072
Thanks for your reply. I solved the problem. The connecting method is up to the base classes of my software, everything was in stable stucture. The problem comes from Synchronize time witih Internet time option of Windows.
I found the solution to omit that extra dialog from msdn page of Microsoft. In my case, I don't need that dialog, whenever the software can't find the database, it will create a new automatically.
0
 
LVL 1

Author Comment

by:nthnhung
ID: 17047521
Please close this question as my request if there is no objection from experts.
Thanks.
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 17076069
Closed, 400 points refunded.
Netminder
Site Admin
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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