With AQTime, you can export profiling results to a database. To do this, you call specific commands from the context menu of the Explorer panel and specify the desired database in the ensuing dialog.
You can also use AQTime’s COM interfaces to export results to a database. To do this:
-
Connect to AQTime via COM.
-
Obtain a reference to the
IaqExportResultsToDBManager
object. -
Call the
ExportCurrentResults
method of this object.
The following Visual Basic code demonstrates how you can perform these steps:
Notes:
-
To obtain the
IaqExportResultsToDBManager
object, we use the following code:Visual Basic
Set AQtimeObj = CreateObject("AQtime.AQtime")
...
Set Mngr = AQtimeObj.Manager.ManagersByString("{35A743D2-CEA8-4491-A7AA-E1D61468FCE6}")That is, we obtain this object through the
Manager
property of the AQTime COM object. TheManagersByString
property returns the desired object by its interface’s GUID. -
The
ExportCurrentResults
method has the following syntax:IDL
HRESULT ExportCurrentResults(
[in] BSTR ConnectionString,
[in] BSTR Login,
[in] BSTR Password);The ConnectionString parameter specifies the string that is used to connect to the database. The content of this string depends on the database type and location. In our example, we export data to a Microsoft Access database (.mdb file). The file name is part of the connection string:
Visual Basic
Call Mngr.ExportCurrentResults("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Export.mdb;Persist Security Info=False", "", "")
Note that the database (in our case, the Export.mdb file) must exist. The method does not create the database. It exports data into existing databases.
The Login and Password parameters specify the user account and password that will be used to connect to the database.
See Also
Automating AQTime
Exporting Profiling Results to Database
Working With AQTime via COM
Working With AQTime via COM - Overview