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

VC修改Access密码

void ModifyDBCode()
{
 CString strPath;
 ::GetModuleFileName(GetModuleHandle(NULL),strPath.GetBuffer(256),256);
 strPath.ReleaseBuffer();
 int flag=strPath.ReverseFind('\\');
 int size=strPath.GetLength();
 strPath.Delete(flag,size-flag);
 strPath= strPath+ _T("\\test.mdb");     //数据库名称
 CString strConn=_T("Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=");
 CString buf=strPath;
 ASSERT(buf != _T(""));
 strConn+=buf;
 strConn+=_T(";Jet OLEDB:Database Password = ");
 strConn+= g_strPassword;
 strConn+=_T(";Mode=Share Deny Read|Share Deny Write");      // du zhan fang shi da kai
 CADODatabase pAdoDb;
 pAdoDb.SetConnectionString(strConn);
 if(!pAdoDb.Open()) return;
 CString strExe = _T("ALTER DATABASE PASSWORD [");
 strExe += m_strNewCode;
 strExe += _T("] [");
 strExe += g_strPassword;
 strExe += _T("]");
 pAdoDb.Execute(strExe);
}


相关文档:

Access与Sql Server之ASP代码比较

后台数据库:
[Microsoft Access]

[Microsoft Sql Server]
更换之后,ASP代码应注意要修改的一些地方:
[一]连接问题(举例)
[Microsoft Access]
constr = "DBQ=c:\data\clwz.mdb; DRIVER={Microsoft Access Driver (*.mdb)}"
[Microsoft Sql Server]
constr = "DRIVER={SQL Server};SERVER=host;DATA ......

access下的分页方案

具体不多说了,只贴出相关源码~
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using System.Web;
/**//// <summary>
/// 名称:access下的分页方案(仿sql存储过程)
/// 作者:cncxz(虫虫)
/// blog:http://cncxz.cnblogs.com
/// ......

access db

 class Program
    {
        static void Main(string[] args)
        {
            String conStr = "Data Source=mesqas;User ID=ctdsp_oee;Password=12345 ......

access中时间要用#,不是双引号

转自
http://topic.csdn.net/t/20050110/09/3711952.html
access中时间要用#,不是双引号  
  select   *   from   kc   where   rq   <   #2000-01-01#   and   rq>#2002-01-01#  
  不要用between,它的效率泰低  
使用# 而不是 ......

ACCESS和MSSQL 如何随机读取数据库记录

查询语句只要这样写,就可以随机取出记录了
SQL="Select top 6 * from Dv_bbs1 where isbest = 1 and layer = 1 order by newID() desc"
在ACCESS里
SELECT top 15 id from tablename order by rnd(id)
SQL Server:
Select TOP N * from TABLE Order By NewID()
Access:
Select TOP N * from TABLE Order By Rnd(ID ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号