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
/// </summary>
public class AdoPager
{
protected string m_ConnString;
protected OleDbConnection m_Conn;
public AdoPager()
{
CreateConn(string.Empty);
}
public AdoPager(string dbPath)
{
CreateConn(dbPath);
}
private void CreateConn(string dbPath)
{
if (string.IsNullOrEmpty(dbPath))
{
string str = System.Configuration.ConfigurationManager.AppSettings["dbPath"] as string;
if (string.IsNullOrEmpty(str))
str = "~/App_Data/db.mdb";
m_ConnString = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data source={0}", HttpContext.Current.Server.MapPath(str));
}
else
m_ConnString = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data source={0}", dbPath);
m_Conn = new OleDbConnection(m_ConnString);
}
/**//// <summary>
/// ´ò¿ªÁ¬½Ó
/// <
Ïà¹ØÎĵµ£º
9.3 ͨ¹ýPHP²Ù×÷AccessÊý¾Ý¿â
9.3.1 Á¬½ÓAccessÊý¾Ý¿â
ÔÚPHPÖÐÁ¬½ÓAccessÓÐÈçÏÂ3ÖÖ·½Ê½¡£
£¨1£©´´½¨ÏµÍ³Êý¾ÝÔ´£¬ÓÃPHPÌṩµÄODBCº¯Êý
¼´¿É¡£
£¨2£©Í¬Ñù¿ÉÒÔʹÓÃPHPµÄODBCº¯Êý£¬µ«²»´´½¨
Êý¾ÝÔ´¡£¿ª·ÅÊý¾Ý¿âÁ¬½Ó£¨Open DateBase
Conection£¬ODBC£©ÊÇWindows Open
Server£¨¿ª·Å·þÎñ£©API£¨WOSA£©²úÆ·Ö®Ò ......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace Str
{
public partial class Form1 : F ......
///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
//ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "MyData.mdb";
//È¥µ ......
ÕâÒ»´ÎÀ´¼òµ¥½éÉÜÒ»ÏÂÎÒÔÚѧϰÖÐÓöµ½µÄÒ»¸öÎÊÌ⣬ÎÒÏÈÃèÊöһϣ¬È»ºó¿´²Ù×÷(ÉùÃ÷Ò»µã£ºÕâÒ»´ÎÎÒûÓаÑÕâ¸öÎÊÌâ½â¾öµô£¬Ï£ÍûÓÐÈ˰ïÎÒ½â´ð)
-------------------------------------------------------------------------
»·¾³£ºwin2003 tomcat6 jsp»·¾³
ÎÒʹÓÃaccess2003×öÊý¾Ý¿â£¬Êý¾ÝÔ´ÒѾÅäÖúã¬Á¬½ÓÊý¾Ý ......
ת×Ô£ºhttp://dev.yesky.com/243/2230743.shtml
ADO(ActiveX Data Object)ÊÇMicrosoftÊý¾Ý¿âÓ¦ÓóÌÐò¿ª·¢µÄнӿڣ¬Êǽ¨Á¢ÔÚOLE DBÖ®Éϵĸ߲ãÊý¾Ý¿â·ÃÎʼ¼Êõ£¬¼´Ê¹Äã¶ÔOLE DB£¬COM²»Á˽âÒ²ÄÜÇáËɶԸ¶ADO,ÒòΪËü·Ç³£¼òµ¥Ò×Óã¬ÉõÖÁ±ÈÄãÒÔÍùËù½Ó´¥µÄODBC API¡¢DAO¡¢RDO¶¼ÒªÈÝÒ×ʹÓ㬲¢²»Ê§Áé»îÐÔ¡£±¾ÎÄÏêϸµØ½éÉÜÔÚVisual C ......