Click here to Skip to main content
15,898,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can i make an toolbar icon 48x48 256 colour Pin
vasmvr3-Sep-07 5:03
vasmvr3-Sep-07 5:03 
GeneralRe: How can i make an toolbar icon 48x48 256 colour Pin
Nishad S3-Sep-07 5:43
Nishad S3-Sep-07 5:43 
GeneralRe: How can i make an toolbar icon 48x48 256 colour [modified] Pin
vasmvr3-Sep-07 21:02
vasmvr3-Sep-07 21:02 
QuestionMixing Unicode and Non Unicode CEdit, CWnd Pin
Nawal K Gupta3-Sep-07 3:13
Nawal K Gupta3-Sep-07 3:13 
AnswerRe: Mixing Unicode and Non Unicode CEdit, CWnd Pin
KarstenK3-Sep-07 3:50
mveKarstenK3-Sep-07 3:50 
AnswerRe: Mixing Unicode and Non Unicode CEdit, CWnd Pin
Waldermort3-Sep-07 7:25
Waldermort3-Sep-07 7:25 
GeneralRe: Mixing Unicode and Non Unicode CEdit, CWnd Pin
Nawal K Gupta4-Sep-07 3:43
Nawal K Gupta4-Sep-07 3:43 
QuestionUnhandled exception Pin
sanjutvm3-Sep-07 2:51
sanjutvm3-Sep-07 2:51 
Hi,

I'm using VC++ and ODBC Connection.

I've an exe and related folders in the Machine1.
The exe will be run as a service using srvany.exe in Machine2 and Machine3.

Based on the availablity of network connection I need to stop or proceed the application. I'm getting unhadled exception instead of catching the exception.
if the exe is run from the system where the exe and dlls are, the exception will be caught properly.
Why do this happen?

Just before opening a recordset, i disable and enable the network connection.
While opening, it throws an exception which is not getting caught, though i've given CDBException, CException, default exception block.
In the dbcore.cpp, it goes to the catch block of Open() from where TROW_LAST is called and writes these trace messages.

State:08S01,Native:11,Origin:[Microsoft][ODBC SQL Server Driver][DBNETLIB]
State:01000,Native:10054,Origin:[Microsoft][ODBC SQL Server Driver][DBNETLIB]
General network error. Check your network documentation.
ConnectionWrite (send())

The hierarchy is like this CRecordset->CMyRecordset->CTableRec.
The CMyRecordset::Open() will check for network availability before calling CRecordset::Open().
The network availablity is checked using:

SQLRETURN nReturnVal = ::SQLGetConnectAttr(m_hdbc,SQL_ATTR_CONNECTION_DEAD,
(SQLPOINTER&nConnectionStatus,sizeof(SQLINTEGER),NULL);
switch (nReturnVal)
{
case SQL_SUCCESS:
case SQL_SUCCESS_WITH_INFO:
bStatus = (BOOL) ((nConnectionStatus == SQL_CD_TRUE) ? FALSE : TRUE);
break;
default:
bStatus = FALSE;
break;
}
bStatus is always 1, irrespective of network connection.
How do i check it or how do i handle the unhandled exception?


Thanks & Regards,
Sanju
QuestionInternationalization Pin
Krishnatv3-Sep-07 2:43
Krishnatv3-Sep-07 2:43 
AnswerRe: Internationalization Pin
truestepper3-Sep-07 3:00
truestepper3-Sep-07 3:00 
GeneralRe: Internationalization Pin
Krishnatv3-Sep-07 3:49
Krishnatv3-Sep-07 3:49 
GeneralRe: Internationalization Pin
truestepper3-Sep-07 4:17
truestepper3-Sep-07 4:17 
AnswerRe: Internationalization Pin
jhwurmbach3-Sep-07 3:31
jhwurmbach3-Sep-07 3:31 
GeneralRe: Internationalization Pin
Krishnatv3-Sep-07 3:51
Krishnatv3-Sep-07 3:51 
AnswerRe: Internationalization Pin
Maximilien3-Sep-07 3:35
Maximilien3-Sep-07 3:35 
AnswerRe: Internationalization Pin
Hamid_RT3-Sep-07 4:48
Hamid_RT3-Sep-07 4:48 
Questionlanguage specific characters dialog Pin
truestepper3-Sep-07 2:43
truestepper3-Sep-07 2:43 
QuestionPass XML to an HTTP address in Visual C Pin
mariokempes3-Sep-07 2:33
mariokempes3-Sep-07 2:33 
Questionabout Thread Creation Pin
Member 43990943-Sep-07 2:28
Member 43990943-Sep-07 2:28 
AnswerRe: about Thread Creation Pin
chandu0043-Sep-07 2:32
chandu0043-Sep-07 2:32 
GeneralRe: about Thread Creation Pin
Member 43990943-Sep-07 2:41
Member 43990943-Sep-07 2:41 
GeneralRe: about Thread Creation Pin
chandu0043-Sep-07 2:47
chandu0043-Sep-07 2:47 
GeneralRe: about Thread Creation Pin
Member 43990943-Sep-07 3:00
Member 43990943-Sep-07 3:00 
AnswerRe: about Thread Creation Pin
Mark Salsbery3-Sep-07 8:57
Mark Salsbery3-Sep-07 8:57 
GeneralRe: about Thread Creation Pin
Member 43990943-Sep-07 21:53
Member 43990943-Sep-07 21:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.