Recently encountered a very strange error: Unhandled exception in 0xc0000005 *.exe:0xc0000005:acess violation. Puzzled by the solution. Very depressed.
The cause is to debug a book called "Visual C + + 6.0 Enterprise Management System Instance navigation" source code. Its code is developed with vc6.0+ado+sqlserver2000. I ported the database to sqlserver2005 and configured it to complete ODBC as required. Then direct compilation runs. There is no problem with the compile process, and a run will report the above error. Somehow. There is no way to track debugging and find that the following error always occurs when you run to the open result set:
Unhandled exception in *.exe (KERNEL32. DLL); 0xe06d7363:microsoft C + + Exception.
The unhandled exception in *.exe:acess violation is determined later. Error.
Continue to trace into the result set opening function open () inside, this time to find the cause: its return handle value is -2147217865 (80040e37), a check that the table name is invalid. Not possible.
Later I saw this person blog: http://blog.csdn.net/Benben9527/archive/2007/04/25/1584172.aspx mentioned a problem: When you restore a database backup to another server, you may have problems with orphaned users. My database is not restored, it is directly attached, this problem should not exist. However, it is possible to set up ODBC when the login username is set incorrectly. Change Integrated Windows authentication to SQL Server that uses user input IDs and passwords. and set the default settings. Next, change the default database to select your database.
Ok. Compile again and run, problem excluded.