PBÖÐÁ¬½ÓAccessÊý¾Ý¿âµÄÈýÖÖ·½·¨
PBÖÐÁ¬½ÓAccessÊý¾Ý¿âµÄÈýÖÖ·½·¨
·½Ê½Ò»£º
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='driver=Microsoft Access Driver (*.mdb);DBQ=c:\foodmart.mdb'"
CONNECT;
IF SQLCA.SQLCode <> 0 THEN
MessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü","ÇëÓë¹ÜÀíÔ±ÁªÏµ¡£´íÎóºÅ:" + String(SQLCA.SQLCode) + "~r~n´íÎóÔÒò:" + SQLCA.SQLErrText)
RETURN
else
MessageBox("Êý¾Ý¿âÁ¬½Ó³É¹¦","ÏÖÔÚ½øÈëϵͳ... ...")
end if
·½Ê½¶þ£º
SQLCA.DBMS = "OLE DB"
SQLCA.AutoCommit = False
SQLCA.DBParm = "PROVIDER='Microsoft.Jet.OLEDB.4.0',DATASOURCE='C:\foodmart.mdb'"
CONNECT;
·½Ê½Èý£º
½¨Á¢DSN£¬Í¨¹ýODBCÁ¬½Ó¡£Õâ¸ö¾Í²»Óöà˵ÁË¡£
ÀýÈç:
// Profile my_ass
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=my_ass'"
catalog tables could not be created and are not available for use ÎÊÌâ½â¾ö·½·¨:
ÕâÖÖÇé¿ö¶à¼ûÓÚ´ÓSQL server תµ½ Access Êý¾Ý¿â,ÓÃODBCÁ¬½ÓµÄÇé¿ö
°ÑsqlserverÊý¾Ý¿âÀïµÄÎå¸ö‘pb’×Öĸ¿ªÍ·µÄÊý¾Ý±íµ¼Èëµ½accessÊý¾Ý¿âÀïÈ¥£¬ÔÙÁ¬½Ó¾Í²»ÌáʾÁË
¹ØÓÚ¶¯Ì¬×¢²áODBCÊý¾ÝÔ´
¹ØÓÚ¶¯Ì¬×¢²áAccessÊý¾ÝÔ´
//***********************************************
// º¯ÊýÃû: gf_setodbc_access
// ¹¦ÄÜ: Íê³ÉaccessÊý¾ÝÔ´µÄ×¢²á¹¦ÄÜ
// ÊäÈë²ÎÊý:
// as_database Êý¾Ý¿âÃû
// (¼´AccessÊý¾Ý¿âÎļþÃû×Ö£¬²»º¬À©Õ¹Ãû)
// as_path Êý¾Ý¿âÎļþËùÔÚµÄĿ¼
// ·µ»ØÖµ:
// true ±íʾ×Ô¶¯ÅäÖóɹ¦
// false ±íʾ×Ô¶¯ÅäÖÃʧ°Ü
// Éè¼ÆÕß: Adamswater
// Íê³Éʱ¼ä: 2005Äê6ÔÂ
//***************************************************
boolean lb_rtn
string ls_root,ls_root_dsn,ls_root_Jet,ls_root_Engines
integer li_rtn
string ls_
Ïà¹ØÎĵµ£º
½ñÌì̸Á½¸öASPÔËÐÐʱ¿ÉÄܳöÏÖµÄÓëIISÓйصĴíÎó
-------------------------------------------------------------------
´íÎóÀàÐÍÒ»£º
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] ²»ÄܸüС£Êý¾Ý¿â»ò¶ÔÏóΪֻ¶Á¡£
´íÎóÀàÐͶþ£º
Microsoft OLE DB Provider ......
×î½üϵͳÔËÐÐÖз¢ÏÖAccess 2003 °æ±¾ÖжԴý Null ºÍ ‘’ £¨¿Õ×Ö·û£©Ææ¹ÖÎÊÌâ£¬ÖØÏÖ²½Ö裺
1¡¢´´½¨±ítabTest £»
2¡¢Ê¹ÓÃÉè¼ÆÊÓͼÌí¼ÓÁ½¸ö×Ö¶Î ID £¬col1
Ãû³Æ
ÀàÐÍ
³¤¶È
˵Ã÷
ID
Number
Ö÷¼ü£¬×ÔÔö
Col1
char
1
ÎÞ
3¡¢Ê¹ÓÃsql Ìí¼ÓÈçÏÂÊý¾Ý
-- col1 ×Ö¶ÎÉèÖÃΪ null
INS ......
ÔÚдÕâÆª²©ÎĵÄʱºò£¬ÎÒÕæµÄÈ̲»×¡½ÐÒ»Éù£¬ËûÂèµÄ±ä̬£¬½ñÌì×öÒ»¸öÍøÕ¾Ê±ºò£¬ÓÉÓÚÒªÓõ½ACCESS£¬ÄǾÍÓÃÁË£¬°Ñ֮ǰµÄÁ´½ÓÓï¾äCOPY+C¹ýÀ´
¿´¿´ÓÐʲôÎÊÌâ¡£
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="+System.Web.HttpContext.Current.Server.MapPath("window2003.mdb");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
asp ÖÐÎÄÂÒÂë,asp access ÂÒÂë,asp ˢкóÂÒÂë,asp utf 8ÂÒÂë,ajax ÂÒÂë asp,asp ºº×ÖÂÒÂë,aspÂÒÂëÔõô°ì
ÓÃutf-8±àÂëÓÃÔÚеÄÍøÕ¾ÉÏ£¬²»ÏëÎÊÌâ»¹Õæ¶à£¬ËùÒÔÕÒÁËЩÎÄÕ£¬Ìû×Ó£¬¿´ÁË¿´£¬µÈÏÂÓÐÓõľÍÌùÏÂÃæÁË¡£
½ñÌ죬ÎÒ¿ªÊ¼°Ñ CODEPAGE="936" ¸Ä³É CODEPAGE="65001"
°Ñcharset=gb2312¸Ä³É charset=utf-8
¿ÉÊÇ»¹ÊÇÂÒÂë ......
*
* ¹¦ÄÜ˵Ã÷:±¸·ÝºÍ»Ö¸´SQL ServerÊý¾Ý¿â
* ×÷Õß: Áõ¹¦Ñ«;
* °æ±¾:V0.1(C#2.0);ʱ¼ä:2007-1-1
* µ±Ê¹ÓÃSQL Serverʱ,ÇëÒýÓà COM×é¼þÖеÄ,SQLDMO.dll×é¼þ
* µ±Ê¹ÓÃAccessÖÐ,Çëä¯ÀÀÌí¼ÓÒýÓÃÒÔÏÂÁ½¸ödll
* ÒýÓÃC:/Progra ......