Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone!

I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.

I have written an application in C++ that uses WIN32 API and ADO to query a database and display results in a listview.

Everything works fine, when I test it on Windows XP, but my application starts to "hang" when I test it on Windows 7. I have to "kill" it, or else it seems it would be stuck forever.

I suspect that DEP or some UAC setting is the culprit here, but I can't figure out what to do.
When I try to set DEP to allow my program to run, it reports that it can't be done.

A small note that might help:

I have copied the code for querying the database from my earlier project, which also had to query the database, and was written in C++ using WIN32 API and ADO.
That project works well on both Windows XP and Windows 7.

I work in MS Visual Studio Express 2008, on Windows XP, in C++, using WIN32 API.

If any other information is required ( source code or something similar ), please ask for it, I will more than gladly supply it.
Posted

1 solution

Have a look at Porting C++ Application From XP to Vista/7[^] for some hints to analyze compatibility issues.

Try running as administrator. If that helps, you probably write into program files sub folders: you need to refactor that code to store your user data to some other location.

Maybe this link also helps identify potential issues: Application Compatibility[^].

Cheers
Andi
 
Share this answer
 
Comments
MyOldAccount 2-Jun-13 20:16pm    
Well, I did hardcoded the path for my database in connection string like this:
" C:\\ MyBase.accdb "
but, after changing it to read from my USB ( F:\\ ... ) it worked !
I will try to hardcode it to Desktop or somewhere similar and report my results.
Andreas Gieriet 2-Jun-13 20:50pm    
Have a look at Where Should I Store my Data and Configuration Files if I Target Multiple OS Versions? and can not find the "program data" folder..
Check out for the %ProgramData% folder to store your DB.
Cheers
Andi
MyOldAccount 2-Jun-13 23:21pm    
I have changed the string to "D:\\..." and it works!
Thank you for the links, they "lit the light bulb"!
This solution is officially accepted!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900