资源简介
MFC结合OTL访问oracle数据库的测试代码,实现了通过OTL执行建表、序列操作、插入、批量删除的功能,数据库的连接字符串可通过程序界面改变。
此代码意在测试使用OTL批量删除功能,分别使用插入线程和删除线程使两个操作同时进行。
测试时发现在没有索引的情况下,删除速度比有索引的情况要慢将近100倍。
代码片段和文件信息
// OracleDBTest.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “OracleDBTest.h“
#include “OracleDBTestDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// COracleDBTestApp
BEGIN_MESSAGE_MAP(COracleDBTestApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()
// COracleDBTestApp construction
COracleDBTestApp::COracleDBTestApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
// The one and only COracleDBTestApp object
COracleDBTestApp theApp;
// COracleDBTestApp initialization
BOOL COracleDBTestApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
// Create the shell manager in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
COracleDBTestDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Delete the shell manager created above.
if (pShellManager != NULL)
{
delete pShellManager;
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 278016 2011-10-07 01:58 OracleDBTest\Debug\OracleDBTest.exe
文件 34831 2009-07-15 15:57 OracleDBTest\oci\include\nzerror.h
文件 77174 2007-12-07 18:50 OracleDBTest\oci\include\nzt.h
文件 2193 2002-10-15 04:19 OracleDBTest\oci\include\occi.h
文件 11960 2005-08-26 00:04 OracleDBTest\oci\include\occiAQ.h
文件 35732 2008-04-10 18:15 OracleDBTest\oci\include\occiCommon.h
文件 72822 2009-03-20 00:32 OracleDBTest\oci\include\occiControl.h
文件 40918 2008-04-10 18:15 OracleDBTest\oci\include\occiData.h
文件 25688 2007-10-29 21:29 OracleDBTest\oci\include\occiob
文件 174003 2009-04-30 01:55 OracleDBTest\oci\include\oci.h
文件 7385 2005-09-25 13:59 OracleDBTest\oci\include\oci1.h
文件 10678 2005-07-07 05:39 OracleDBTest\oci\include\oci8dp.h
文件 442412 2008-04-10 18:15 OracleDBTest\oci\include\ociap.h
文件 6359 2005-09-25 13:58 OracleDBTest\oci\include\ociapr.h
文件 43887 2005-09-25 13:58 OracleDBTest\oci\include\ocidef.h
文件 4161 2005-07-07 05:38 OracleDBTest\oci\include\ocidem.h
文件 11588 2005-09-25 13:59 OracleDBTest\oci\include\ocidfn.h
文件 9235 2005-07-07 05:38 OracleDBTest\oci\include\ociextp.h
文件 6659 2005-09-25 13:58 OracleDBTest\oci\include\ocikpr.h
文件 7773 2009-03-16 17:11 OracleDBTest\oci\include\ocixm
文件 4811 2009-04-14 15:53 OracleDBTest\oci\include\ocixm
文件 96427 2009-05-27 00:07 OracleDBTest\oci\include\ocixstream.h
文件 24064 2008-03-10 13:18 OracleDBTest\oci\include\odci.h
文件 7539 2009-01-01 21:48 OracleDBTest\oci\include\oratypes.h
文件 104870 2006-08-01 23:13 OracleDBTest\oci\include\ori.h
文件 15456 2006-08-01 23:13 OracleDBTest\oci\include\orid.h
文件 161534 2006-08-01 23:13 OracleDBTest\oci\include\orl.h
文件 43509 2003-06-09 15:40 OracleDBTest\oci\include\oro.h
文件 119239 2005-07-07 05:38 OracleDBTest\oci\include\ort.h
文件 10092 2006-09-05 22:59 OracleDBTest\oci\include\xa.h
............此处省略48个文件信息
评论
共有 条评论