易截截图软件、单文件、免安装、纯绿色、仅160KB

ADO数据库连接Access

创建基于对话框的应用程序ADO,向对话框中添加一个列表视图控件,并为其添加变量m_Grid
第一步:ADO对象的导入
在StdAfx.h头文件中:
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, bu
//      are changed infrequently
//
#if !defined(AFX_STDAFX_H__D5ADC0DF_B5B2_4973_A035_4F2F1585998F__INCLUDED_)
#define AFX_STDAFX_H__D5ADC0DF_B5B2_4973_A035_4F2F1585998F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN  // Exclude rarely-used stuff from Windows headers
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>  // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>   // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//ADO对象的导入代码
#import"C:\Program Files\Common Files\System\ado\msado15.dll"
no_namespace rename("EOF","adoEOF")rename("BOF","adoBOF")
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__D5ADC0DF_B5B2_4973_A035_4F2F1585998F__INCLUDED_)
第二步:初始化COM环境
BOOL CADOApp::InitInstance()
{
 AfxEnableControlContainer();
 AfxOleInit();//或者::CoInitialize(NULL);
··················
··················
 return FALSE;
}
第三步:连接数据库


相关文档:

Access Insert Into 语法错误 集锦(不断更新中...)

最近在做Access的一个项目,总是莫名其妙的提示:“Insert Into 语法错误”,这样的信息总给人带来很多麻烦,有时候为了这样一个错误要找好久才能解决问题,"Insert Into 语法错误"这个提示本身包含的信息量很少,在跟踪堆栈中有找不到更详细的信息,为了避免大家在开发的过程中遇到同样的错误和困扰。通过查找和 ......

VB.NET压缩ACCESS数据库

'创建数据库
  Private Sub Create(ByVal mdbPath As String)
        If File.Exists(mdbPath) Then
            Throw New Exception("目标数据库已经存在,无法创建")
        ......

C#读取access表,并把数据显示在gridcontrol中

 //读取标准列表
        private void setModelList()
        {
            OleDbConnection Connection = null;
         &n ......

Access Code + Fingerprint Door Lock

Double action
fingerprint
and access code security door lock for your home,
office or small business. Get modern biometric security at your entry point with
this standard door handle style double action doorlock.
This is the most secure and convenient method in assuring only authorized peo ......

c#操作access数据库

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace AddressList
{
public partial class FrmAccessUse : Form
{
public Fr ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号