|
I guess that the files are sorted via the alphabet. So you have to rename them. But it is no good idea.
If you have problems, this "isnt the solution it only cures the symptoms", a typical method in german politics.
I consider to emigrate.
Greetings from Germany
|
|
|
|
|
Why would you want such a thing ?
|
|
|
|
|
Only to put at the end files too long to be compiled (of course... I have a very big project), in this way I will compile for first the files that I'm probally editing and, if there is bugs, I'll get errors more soon.
Russell
|
|
|
|
|
this is probably because you rebuild all every time, no ?
why don't you just recompile only the units you just modified ?
|
|
|
|
|
|
_Russell_ wrote: But as you know, developing you compile many times per hour the same project and shorcuts are very fine.
i don't really get what you mean here...
|
|
|
|
|
|
i want to create a tool bar which should contain both text and bitmap. it should be done in dialog based application
like toolbars in any window(Ex. Back with left arrow, forward with right arrow, save with floppy symbol)
can anyone help me.plz.
thanks in advance
regards
sudhakar
|
|
|
|
|
You can find a lot of samples here in CP.
One sample here[^]
- NS -
|
|
|
|
|
Hi,
I'm using VC++ 6.0 and ODBC connection to SQL Server.
I need to handle the situation when network is disabled and enabled.
I'm applying a retry logic which will check for db connection and try to reconnect for specified number of times within specified time interval.
When the network is disabled during a db function like open/requery etc.,and enabled within specified time interval, it works fine.
When the network is disabled and enabled before a db call, it fails.
Retry logic is as below:
while(!CheckConnection())
{
Reconnect();
nRetries++;
Sleep(nTimeInterval);
}
if(nRetries < SpecifiedNum)
return TRUE;
else
return FALSE;
}
CheckConnection()
{
.........
SQLRETURN nReturnVal = ::SQLGetConnectAttr(m_hdbc,
SQL_ATTR_CONNECTION_DEAD,
(SQLPOINTER) &nConnectionStatus,
sizeof(SQLINTEGER),
NULL);
...........
}
Reconnet()
{
OpenEx(m_strConnectionString, dwFlags)
}
nReturnVal returns success. So it doesn't again open the DB. So it is failing.
If i check validation and reconnect in overdriven function of CRecordset::Open() it will be applied everytime, even if network was not disabled.
How do I check whether network connection has disabled and enabled before calling a db function?
Thanks & Regards,
Sanju
|
|
|
|
|
If you close the DB connection after each DB function youre out of it. So an Open should work.
Arent there thrown any exceptions? Handle them carefully.
Or write a simple SQL statement in a function to test alive-Status.
Greetings from Germany
|
|
|
|
|
Hi,
Thank you for the reply.
Actually I'm not closing the DB connection in between forcefully. Only when the application exits, i'm closing it.
When the network connection is disabled, the db connection goes of.
So when i open a recordset, i'm getting unhandled exception. It is not even going to the catch block.
So before opening the recordset, i checked for connection, using SQLGetConnectAttr(). When the network is disabled and enabled before caling CRecordset::Open(), SQLConnectAttr() returns SQL_SUCCESS. Since, when the network connection got disabled, i'll be out of DB and I'll have to open it again no?
I need to handle this situation.
Thanks & Regards,
Sanju.
|
|
|
|
|
Checking the DB connection should be enough.
If you loose the connection all of your handles are invalid, so you need new and VALID handles. For this you got to reopen!!!
Greetings from Germany
|
|
|
|
|
Hi,
Thank you for the reply.
I'm using SQLConnectAttr()to check the db connection.
When I disable the network, SQLConnectAttr is returning success.
So I'm not able to check the condition and open the db.
this is how the code is:
SQLRETURN nReturnVal = SQLGetConnectAttr(m_hdbc,SQL_ATTR_CONNECTION_DEAD,
(SQLPOINTERnConnectionStatus,sizeof(SQLINTEGER), NULL);
switch(nReturnVal)
{
case SQL_SUCCESS:
bStatus = (BOOL) ((nConnectionStatus == SQL_CD_TRUE) ? FALSE : TRUE);
break;
case SQL_SUCCESS_WITH_INFO:
...
break;
default:
...
break;
}
The nReturnVal is always SQL_SUCCESS, if network connection is available or not. Based on nReturnVal only, i can reopen the db.
DBMS Name = MS_SQL_SERVER_DBMS
Driver Name(SQLSRV32.DLL)
ODBC Driver Version(03.52)
Driver Version(03.85.1117)
What should i do?
Thanks & Regards,
Sanju
|
|
|
|
|
sanjutvm wrote: So when i open a recordset, i'm getting unhandled exception.
Which implies you should have a try /catch block to handle this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Thank you for the reply.
I've catch(CDBException* pDB), catch(CException* e), catch(...). But it is not going to any one of this catch block.
Thanks & Regards,
Sanju
|
|
|
|
|
Is IsDestinationReachable() of any help?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Thank you for the reply.
Actually, i need to check the connection status of db if network is disbled and enabled in between. I'm using odbc connection.
Thanks & Regards,
Sanju
|
|
|
|
|
simon alec smith wrote: sorry for the multiple posting
don't say that. just delete your multiple posts and please follow a same and only thread
spot the delete and Modify links at the bottom of your messages... you are on a forum, not a chat
|
|
|
|
|
Getting Undeclared identifier in MFC
|
|
|
|
|
Please provide some more informations...
MSDN says :
Requirements<br />
<br />
Header: atlimage.h
did you include this header?
|
|
|
|
|
Please show the relevant code-snippet.
(And delete the other, unused, forum posts. Thank you!)
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
Already posted this, and tried out <altimage.h> didn't work
anything else you might suggest
|
|
|
|
|
please don't post multiple posts.....
|
|
|
|
|
Hi,
I start first instance of my activex control in IE it works fine, but when i launch another instance of IE that contains my activex control it crashes, does anyone know about it?
Best Regards,
Mushq
Mushtaque Ahmed Nizamani
Software Engineer
Ultimus Pakistan
|
|
|
|