odbc
R DEVI PRASAD -- devi@swathi.ecil.stph.net Tuesday, February 06, 1996 Hi all, I use VC++ as a front end to the SQL-SERVER running on NT 3.5. I have clearly listed out the problem i'm facing. Any help is appreciated. here's the problem: PlatForm : WindowsNT ver 3.51 Visual C++ ver 2.0 (MFC ver 3.0) SQL Server ver 6.0 Problem : Without user interaction, we are unable to handle the DataBase down condition. Description : What is happening is, in case of DataBase down, when we are executing Open function (CRecordset::Open()) of CRecordset class, we are getting MessageBox informing "Connect Failed". After clicking OK, it is displaying another DialogBox (SQL Server Login). If we try to login again, it is following above sequence. If we press Cancel button of SQL Server Login DialogBox, Open() Function returns FALSE. Because of all the Message and Dialog Boxes, we are unable to catch the DataBase down event automatically ( With Out User Interaction). We've tried using CDBexception too. Question : Is there any method to trap the DataBase down event without user interaction. (Using ODBC MFC classes or Windows SDK). Much Thanks in advance.. devi prasad > .\\\. > ( 0 0 ) > ____________________________.oOo__( ^ )__oOo.____________________________ >(_) \~/ (_) >| | R.Devi Prasad E-mail : devi@swathi.ecil.stph.net | | >| | Graduate Engineer, R&D, | | >| | Computer Group., | | >| | ECIL-Hyderabad - 500 062, India. | | >| | Ph: 91-40-620131 Extn. 3435 >| | | | >| | Res: Plot E10, Sunny Palace,Kamala nagar, ECIL POST, Hyderabad | | >| | | | >| | Project: Automatic Teller machine i/f on X.25 networks. (VC++ 1.52/MFC 3.01/Win 3.11,Eicon X.25 Tool kit ) !!! | | >| |____________________________.oooO___Oooo.____________________________| | >(_) ( ) ( ) (_) > \ ( ) / > \_) (_/ >
Darren Martz -- martz%mspo3@mprgate.mpr.ca Wednesday, February 07, 1996 There is a problem in the CDatabase::Open with MFC3 whereas the call SQLDriverConnect is being passed the window handle of your application. This gives ODBC the ability to "visually" deal with any problems that it can. What you want is to receive an exception if there is ANY problems with the connection - correct? I imagine that you are trying to use your own logon dialog box. Darren Martz martz@mpr.ca ---------- From: owner-mfc-l[SMTP:owner-mfc-l@netcom.com] Sent: Tuesday, February 06, 1996 11:00 AM To: mfc-l Subject: odbc Hi all, I use VC++ as a front end to the SQL-SERVER running on NT 3.5. I have clearly listed out the problem i'm facing. Any help is appreciated. here's the problem: PlatForm : WindowsNT ver 3.51 Visual C++ ver 2.0 (MFC ver 3.0) SQL Server ver 6.0 Problem : Without user interaction, we are unable to handle the DataBase down condition. Description : What is happening is, in case of DataBase down, when we are executing Open function (CRecordset::Open()) of CRecordset class, we are getting MessageBox informing "Connect Failed". After clicking OK, it is displaying another DialogBox (SQL Server Login). If we try to login again, it is following above sequence. If we press Cancel button of SQL Server Login DialogBox, Open() Function returns FALSE. Because of all the Message and Dialog Boxes, we are unable to catch the DataBase down event automatically ( With Out User Interaction). We've tried using CDBexception too. Question : Is there any method to trap the DataBase down event without user interaction. (Using ODBC MFC classes or Windows SDK). Much Thanks in advance.. devi prasad > .\\\. > ( 0 0 ) > ____________________________.oOo__( ^ )__oOo.____________________________ >(_) \~/ (_) >| | R.Devi Prasad E-mail : devi@swathi.ecil.stph.net | | >| | Graduate Engineer, R&D, | | >| | Computer Group., | | >| | ECIL-Hyderabad - 500 062, India. | | >| | Ph: 91-40-620131 Extn. 3435 >| | | | >| | Res: Plot E10, Sunny Palace,Kamala nagar, ECIL POST, Hyderabad | | >| | | | >| | Project: Automatic Teller machine i/f on X.25 networks. (VC++ 1.52/MFC 3.01/Win 3.11,Eicon X.25 Tool kit ) !!! | | >| |____________________________.oooO___Oooo.____________________________| | >(_) ( ) ( ) (_) > \ ( ) / > \_) (_/ >
| Вернуться в корень Архива |