app hangs after ODBC API call

app hangs after ODBC API call

Post by TS4 » Wed, 10 Aug 2005 02:05:08


Our app that uses MFC ODBC classes(CDATABASE, CRECORDSET) often hangs
after the folllowing sequence:

- open connection
- connection to DB lost due to network problems
- close connection
- open connection
- open recordset

App hangs in CRecordset::PrepareAndExecute() while executing
SQLExecDirect

Anybody experienced anything like that? Maybe DB disconnects are
supposed to be handled differently?
 
 
 

1. app hangs after ODBC API call

2. ODBC works fine when app on desktop but hangs when app run from scheduler?

I have an app that connects to ODBC / SQL Server and reads some records,
updates a few records, and then terminates. On the desktop, this app
performs flawlessly. When I schedule this app in the NT2000 task scheduler
in Control Panel, I give it same login/permissions as I use to sign into my
interactive desktop yet it hangs during the ODBC connect
phase/command/string.

The ODBC data-source is defined in the control panel of the machine as a
system data source. I also tried FILE based and standard data source.
Seems to be no difference.

If I run a process list tool, I can see my app and all of the objects its
grabbed in window station 0, but nothing moves or completes. Its as if the
app is *** on connect, or getting some error that I can't see or respond
to. I've tried to write errors out to text/disk so I could maybe trace
where it get stuck but to no avail....

Any thoughts?

SQL Server 7 and 2000 have same problem. App is on machineA and sql server
engine on machineB over TCP/IP

--Mark Hripko

3. Calling OSX API similar to calling Win32 API?

4. Calling stored procedure from ODBC API

5. SetWinEventHook API hangs app

6. 3rd party API call hangs application

7. CloseClusterNotifyPort() API call hangs.

8. The thread hangs when calling Win32 API SetEntriesInAcl()

9. ODBC CALLS HANGING AFTER XP UPGRADE

10. The thread hangs when call Win32 API SetEntriesInAcl()

11. Call to WaveOut API Hangs in destructor

12. CloseClusterNotifyPort() API call hangs.

13. Add Windows API Call to app?

14. VB app needs to call C API