Home > Software engineering >  Have been using VC editing the connect to the database, open the excel and import access, now want t
Have been using VC editing the connect to the database, open the excel and import access, now want t

Time:11-01

Now want to use vc + + to test the time it takes for the (best can display)
Such as: connect to the database used by the time, the time required to open the excel, import/extracted first. XLS the time it takes the first sheet needed time, similar to this,
To achieve this functionality,
what should I do?And I ordered the first when connecting to the database connection is successful, but if I order the second, will display the connection fails, but the database have been connected, I want to show that the database has been successfully connected, such content, what shall I do? Pray god to solve

CodePudding user response:

Define two macro
# define _ConsumeTmStart dwords dwStartTick=GetTickCount () ();
# define _ConsumeTmEnd () TRACE (_T (" consume tick=% u \ n "), the GetTickCount () - dwStartTick);
When use to insert the two macro

When the connection is to check whether have connection, if you have connected directly returns TRUE, open or shut down first, and then



CodePudding user response:

reference 1st floor zgl7903 response:
define two macro
# define _ConsumeTmStart dwords dwStartTick=GetTickCount () ();
# define _ConsumeTmEnd () TRACE (_T (" consume tick=% u \ n "), the GetTickCount () - dwStartTick);
When use to insert the two macro

When the connection is to check whether have connection, if you have already connected directly returns TRUE, open or shut down first, and then

Check connection that part of the language should be how to write? '

CodePudding user response:

Before the start of the put TmStart connection TmEnd on the end of the connection
  • Related