-
大小: 519KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2021-05-22
- 語言: 數(shù)據(jù)庫
- 標(biāo)簽: VS2005C#SQL??
資源簡介
VS2005環(huán)境下用ADO接口操作SQL2005,實現(xiàn)簡單的數(shù)據(jù)添加 刪除查詢操作

代碼片段和文件信息
//?Ado.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Ado.h“
#include?“AdoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CAdoApp
BEGIN_MESSAGE_MAP(CAdoApp?CWinApp)
//{{AFX_MSG_MAP(CAdoApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CAdoApp?construction
CAdoApp::CAdoApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CAdoApp?object
CAdoApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CAdoApp?initialization
BOOL?CAdoApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?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.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
AfxOleInit();
m_pConnection.CreateInstance(__uuidof(Connection));
m_pConnection->Open(“Provider=Microsoft.Jet.OLEDB.4.0;Data?Source=Demo.mdb“““““adModeUnknown);
CAdoDlg?dlg;
m_pMainWnd?=?&dlg;
int?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
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1287??2009-06-21?16:53??Ado\Ado.clw
?????文件???????3525??2009-06-21?16:36??Ado\ReadMe.txt
?????文件????????205??2009-06-21?16:36??Ado\StdAfx.cpp
?????文件???????4105??2009-06-21?16:36??Ado\Ado.dsp
?????文件????????514??2009-06-21?16:36??Ado\Ado.dsw
?????文件?????107520??2009-06-21?16:53??Ado\Ado.ncb
?????文件???????1323??2009-06-21?16:38??Ado\Ado.h
?????文件???????1200??2009-06-21?16:40??Ado\StdAfx.h
?????文件????????910??2009-06-21?16:40??Ado\Resource.h
?????文件??????35776??2009-06-21?16:40??Ado\Ado.aps
?????文件???????5649??2009-06-21?16:40??Ado\Ado.rc
?????文件????????240??2009-06-21?16:53??Ado\Ado.plg
?????文件???????2285??2009-06-21?16:42??Ado\Ado.cpp
?????文件???????1449??2009-06-21?16:47??Ado\AdoDlg.h
?????文件???????5265??2009-06-21?16:52??Ado\AdoDlg.cpp
?????文件??????67584??2009-06-21?16:53??Ado\Demo.mdb
?????文件??????48640??2009-06-21?16:53??Ado\Ado.opt
?????文件??????90667??2007-06-01?08:00??Ado\Debug\msado15.tlh
?????文件??????76638??2007-06-01?08:00??Ado\Debug\msado15.tli
?????文件???????2724??2009-06-21?16:40??Ado\Debug\Ado.res
?????文件?????238592??2009-06-21?16:53??Ado\Debug\vc60.idb
?????文件?????561152??2009-06-21?16:52??Ado\Debug\vc60.pdb
?????文件?????134147??2009-06-21?16:40??Ado\Debug\StdAfx.obj
?????文件?????114736??2009-06-21?16:52??Ado\Debug\Ado.exe
?????文件?????582656??2009-06-21?16:52??Ado\Debug\Ado.pdb
?????文件??????36228??2009-06-21?16:47??Ado\Debug\Ado.obj
?????文件?????283888??2009-06-21?16:52??Ado\Debug\Ado.ilk
?????文件??????69340??2009-06-21?16:52??Ado\Debug\AdoDlg.obj
?????文件????????395??2009-06-21?16:36??Ado\res\Ado.rc2
?????文件???????1078??2009-06-21?16:36??Ado\res\Ado.ico
............此處省略6個文件信息
評論
共有 條評論