Click here to Skip to main content
16,004,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why LoadMenu() Failed! Errorcode=1814 Pin
AssemblySoft1-Sep-04 23:41
AssemblySoft1-Sep-04 23:41 
GeneralWait for your Help! Pin
YunYan2-Sep-04 1:07
YunYan2-Sep-04 1:07 
GeneralAny body can help me! Pin
YunYan2-Sep-04 2:49
YunYan2-Sep-04 2:49 
GeneralRe: Why LoadMenu() Failed! Errorcode=1814 Pin
David Crow2-Sep-04 3:00
David Crow2-Sep-04 3:00 
GeneralWM_QUERYENDSESSION From a dll Pin
AssemblySoft1-Sep-04 23:25
AssemblySoft1-Sep-04 23:25 
Generalpressed button sends message Pin
Tibor Blazko1-Sep-04 22:57
Tibor Blazko1-Sep-04 22:57 
GeneralHelp me!!!!! Pin
Anonymous1-Sep-04 22:44
Anonymous1-Sep-04 22:44 
GeneralSQL_ATTR_CONNECTION_DEAD attribute of MySQL not working as expected Pin
Anonymous1-Sep-04 22:37
Anonymous1-Sep-04 22:37 
Hi,

I am trying to get the connection status of my ODBC connection to MySQL in a VC++.Net project, by retrieving the "SQL_ATTR_CONNECTION_DEAD" attribute using the SQLGetConnectAttr function.
But whether the MySQL server is running or not its always returning 0 which implies SQL_CD_FALSE (i,e. the connection is still active.)

I made the connection as folows:-

SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv);
SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,(void *)SQL_OV_ODBC3,0);
SQLAllocHandle(SQL_HANDLE_DBC,henv, &hdbc);
SQLConnect(hdbc,pmydsn, SQL_NTS, pmyuid, SQL_NTS, pmypwd, SQL_NTS);

Now after this connection is established I try to get the status by calling the following function;

SQLGetConnectAttr(hdbc,SQL_ATTR_CONNECTION_DEAD,&value,sizeof(SQLINTEGER),&strln);

I get back value = 0 implying the connection is still active.

now i manually stop the MySQL server from the command prompt and again execute the same function but i still get back value = 0 .

Can u help me to figure out where i m going wrong and making a blunder.

ur prompt reply is highly recommended

Nitin Bansal

GeneralPointer array access outside a class! Pin
CreepingFeature1-Sep-04 22:06
CreepingFeature1-Sep-04 22:06 
GeneralRe: Pointer array access outside a class! Pin
Mike Beckerleg1-Sep-04 22:35
Mike Beckerleg1-Sep-04 22:35 
GeneralRe: Pointer array access outside a class! Pin
Anonymous2-Sep-04 2:20
Anonymous2-Sep-04 2:20 
GeneralRe: Pointer array access outside a class! Pin
Mike Beckerleg2-Sep-04 3:09
Mike Beckerleg2-Sep-04 3:09 
GeneralRe: Pointer array access outside a class! Pin
CreepingFeature2-Sep-04 21:00
CreepingFeature2-Sep-04 21:00 
GeneralZIP files programmatically using MFC C++ Pin
anderslundsgard1-Sep-04 20:37
anderslundsgard1-Sep-04 20:37 
GeneralRe: ZIP files programmatically using MFC C++ Pin
PJ Arends1-Sep-04 21:18
professionalPJ Arends1-Sep-04 21:18 
GeneralControlling Device and Internet Pin
zahid_ash1-Sep-04 19:46
zahid_ash1-Sep-04 19:46 
GeneralEdit Box messages Pin
shiraztk1-Sep-04 19:21
shiraztk1-Sep-04 19:21 
GeneralRe: Edit Box messages Pin
Scozturk1-Sep-04 21:45
professionalScozturk1-Sep-04 21:45 
GeneralRe: Edit Box messages Pin
shiraztk1-Sep-04 22:27
shiraztk1-Sep-04 22:27 
GeneralRe: Edit Box messages Pin
wb2-Sep-04 0:52
wb2-Sep-04 0:52 
GeneralRe: Edit Box messages Pin
James R. Twine2-Sep-04 3:48
James R. Twine2-Sep-04 3:48 
GeneralRe: Edit Box messages Pin
shiraztk2-Sep-04 20:16
shiraztk2-Sep-04 20:16 
GeneralMessge routing in SDI/MDI Pin
vikramlinux1-Sep-04 19:02
vikramlinux1-Sep-04 19:02 
Questionanybody has experience of using Nero SDK? Pin
lonely_life1-Sep-04 18:59
lonely_life1-Sep-04 18:59 
Generalscanlogd Pin
Anonymous1-Sep-04 18:58
Anonymous1-Sep-04 18:58 

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.