资源简介
c++链接Access数据库用二进制存储图像,并能显示图像等信息,很好的例子。

代码片段和文件信息
// Example.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Example.h“
#include “ExampleDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExampleApp
BEGIN_MESSAGE_MAP(CExampleApp CWinApp)
//{{AFX_MSG_MAP(CExampleApp)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CExampleApp construction
CExampleApp::CExampleApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CExampleApp object
CExampleApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CExampleApp initialization
BOOL CExampleApp::InitInstance()
{
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.
AfxOleInit();
m_pConnection.CreateInstance(“ADODB.Connection“);
/******************连接数据库********************/
try
{
m_pConnection->ConnectionTimeout = 8;
//连接SQL SERVER
//m_pConnection->Open(“Driver=SQL Server;Database=test;Server=127.0.0.1;UID=sa;PWD=;“““““adModeUnknown);
//连接ACCESS2000
m_pConnection->Open(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Employee.mdb“““““adModeUnknown);
}
catch(_com_error e)///捕捉异常
{
AfxMessageBox(“数据库连接失败!“);
return FALSE;
}
/**********************************************/
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CExampleDlg 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;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4587520 2009-11-04 16:21 c++链接数据库用二进制存储图像,并能显示图像\Employee.mdb
文件 1710 2009-11-05 11:52 c++链接数据库用二进制存储图像,并能显示图像\Example.clw
文件 2656 2004-08-10 11:28 c++链接数据库用二进制存储图像,并能显示图像\Example.cpp
文件 4177 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\Example.dsp
文件 537 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\Example.dsw
文件 443392 2009-11-05 11:52 c++链接数据库用二进制存储图像,并能显示图像\Example.ncb
文件 248 2009-11-05 11:52 c++链接数据库用二进制存储图像,并能显示图像\Example.plg
文件 14214 2004-08-12 08:54 c++链接数据库用二进制存储图像,并能显示图像\ExampleDlg.cpp
文件 3597 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\ReadMe.txt
文件 1145 2004-08-11 13:47 c++链接数据库用二进制存储图像,并能显示图像\resource.h
文件 209 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\StdAfx.cpp
文件 1152 2004-08-10 11:12 c++链接数据库用二进制存储图像,并能显示图像\StdAfx.h
文件 1078 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\res\Example.ico
文件 399 2004-08-10 10:58 c++链接数据库用二进制存储图像,并能显示图像\res\Example.rc2
..A.SH. 3072 2009-11-05 00:45 c++链接数据库用二进制存储图像,并能显示图像\res\Thumbs.db
文件 90619 2008-04-14 20:00 c++链接数据库用二进制存储图像,并能显示图像\msado15.tlh
文件 76614 2008-04-14 20:00 c++链接数据库用二进制存储图像,并能显示图像\msado15.tli
文件 90811 2008-04-14 20:00 c++链接数据库用二进制存储图像,并能显示图像\Debug\msado15.tlh
文件 76710 2008-04-14 20:00 c++链接数据库用二进制存储图像,并能显示图像\Debug\msado15.tli
文件 1767251 2009-10-21 15:35 c++链接数据库用二进制存储图像,并能显示图像\Debug\StdAfx.sbr
文件 0 2009-11-04 15:03 c++链接数据库用二进制存储图像,并能显示图像\Debug\Example.sbr
文件 0 2009-11-04 15:03 c++链接数据库用二进制存储图像,并能显示图像\Debug\ExampleDlg.sbr
文件 3179520 2009-11-04 15:03 c++链接数据库用二进制存储图像,并能显示图像\Debug\Example.bsc
文件 3072 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\Example.res
文件 238592 2009-11-05 11:52 c++链接数据库用二进制存储图像,并能显示图像\Debug\vc60.idb
文件 7703036 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\Example.pch
文件 552960 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\vc60.pdb
文件 133792 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\StdAfx.obj
文件 104778 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\ExampleDlg.obj
文件 42683 2009-11-05 11:50 c++链接数据库用二进制存储图像,并能显示图像\Debug\Example.obj
............此处省略14个文件信息
- 上一篇:VC++6.0小游戏--扫雷源代码
- 下一篇:非线性滤波
相关资源
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- 基础qt数据库读取和显示
- c++ 多功能计算器
- Qt查询SQLite数据库
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
评论
共有 条评论