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

ADO ACCESS 获取表名

BOOL GetAllTables(LPCTSTR databasefile,CStringArray & dbtables)
    {
       //#import "msado15.dll" no_namespace rename("EOF", "adoEOF")   //拷贝 msado15.dll 到工程目录
       _ConnectionPtr m_pConnection;    
        _RecordsetPtr m_pRecordset;    
        HRESULT hr;    
        try        
        { 
            CoInitialize(NULL);
            hr = m_pConnection.CreateInstance(__uuidof(Connection));
            hr =m_pRecordset.CreateInstance(__uuidof(Recordset));
           
            if(SUCCEEDED(hr))            
            {  
                CString strconnection;            
                strconnection.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s",databasefile);            
                hr = m_pConnection->Open((_bstr_t)strconnection,"","",adModeUnknown);            
                m_pRecordset = m_pConnection->OpenSchema(adSchemaTables);        &nb


相关文档:

Failed to access IIS metabase

Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: ......

C++通过ADO连接ACCESS(或者SQL Server)数据库例子

#include "iostream.h"
#include "stdio.h"
#import "C:\program files\common files\system\ado\msado15.dll" no_namespace rename("EOF","adoEOF")
int main(int argc, char* argv[])
{
   ::CoInitialize(NULL);
_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance("ADODB.Connection");
tr ......

用VC处理ACCESS中的位图数据

----比较复杂的数据库中一般会有位图数据(比如相片)。虽然这类“OLE对象”的插入、删除以及替换操作在ACCESS里容易实现,在VC中却显得复杂而且颇费周折。以下把作者用VC处理ACCESS数据库中的位图数据的体会简单叙述一下,以请教于大家。
----在CdaoRecordset派生类的对象中,VC自动为ACCESS的“OLE对象&r ......

ACCESS里面创建带参数的存储过程

需要注意的是page_load里面的创建存储过程只能执行一次,如果第二次还要创建同名的话会提示错误信息“存储过程已经存在。”,其实加个判断就行了。懒得加了,只是用来试验一下。
调试环境 ASP.NET 2.0(编译工具VS2008),代码C#,access版本2003
protected void Page_Load(object sender, EventArgs e)
{
Ol ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号