Ô¶³ÌÁ¬½ÓaccessÊý¾Ý¿âµÄ¼¸¸ö·½·¨£º
ʹÓÃÁËTCP/IP£¬ADO¼°XML£¨ÐèÒª°²×°Microsoft XML 4.0¡££©¡£·Ö·þÎñÆ÷ºÍ¿Í»§¶ËÁ½²¿·Ö£¬·þÎñÆ÷¿ÉÒÔ¶àÓû§Í¬Ê±Á¬½Ó¡£Ô¶³ÌÁ¬½ÓAccessÊý¾Ý¿âÓкܶ෽·¨£¬ÎÒÒÔǰÒѾ±È½Ï¾ßÌåµÄ»Ø´ð¹ý£¨¼ûÏÂÃæËùÁеÄ5ÖÖ·½·¨£©£¬ÎÒÏÖÔÚÕâ¸öÀý×ÓÊôÓÚÆäÖеĵڣ³ÖÖ·½·¨£¨²»ÐèҪʹÓÃRDS»òWeb·þÎñÆ÷£©¡£
Ô¶³ÌÁ¬½ÓaccessÊý¾Ý¿âµÄ¼¸¸ö·½·¨£º
£±£®½¨Á¢VPN£¬ÕâÑùÄãµÄµçÄÔºÍÖ÷»úµÄÁ¬½Ó¾ÍÓë¾ÖÓòÍøÎÞÒ죬Ȼºó°Ñ·þÎñÆ÷ÖÐmdbÎļþËùÔÚµÄFolder¹²Ïí¼´¿É¡£ADOÁ¬½ÓÈçÏ£ºoConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=““ServerName“DatabaseFolder“Database.mdb;Jet OLEDB:Database Password=databasepw;Persist Security Info=False"
£²£®°ÑDatabase·ÅÔÚWeb ServerÉÏ£¬Ê¹ADO»òRDOͨ¹ýRDS£¨Remote Data Service£©¼°IISÀ´ÊµÏÖ£º
¼ÙÈç·þÎñÆ÷ÏñÉÏÃæJave´óÏÀ˵ÄÇÑùÉèÖÃÁËODBC DSNµÄ»°£º
oConn.Open "Provider=MS Remote;" _
"Remote Server=http://myServerName;" _
"Remote Provider=MSDASQL;" _
"DSN=AdvWorks;" _
"Uid=myUsername;" _
"Pwd=myPassword"
¼ÙÈçÉèÖõÄÊÇOLE DB Provider µÄ»°£º
oConn.Open "Provider=MS Remote;" _
"Remote Server=http://myServerName;" _
"Remote Provider=Microsoft.Jet.OLEDB.4.0;" _
"Data Source=c:“somepath“mydb.mdb"£¬ _
"admin"£¬ ""
£³£®×Ô¼º±àд·þÎñÆ÷³ÌÐò£¬Í¨¹ýTCP/IP£¬´«µÝRecordset¡£
£´£®Ê¹ÓõÚÈý·½¿Ø¼þ£¬È磺ADO Anywhere»òUDAParts RDBµÈ¡£¾ßÌå²é¿´
http://www.adoanywhere.com
http://www.udaparts.com/
£µ£®Ê¹ÓÃXMLHTTP
ÌáÐÑ£º¡¡Ô¶³ÌÁ¬½ÓSQL ServerµÄ·½·¨£º
ConnStr = "Provider=SQLOLEDB.1;Network Library=DBMSSOCN;Persist Security Info=True;User ID=UserName;Password=Password;Initial Catalog=Ô¶³ÌÊý¾Ý¿âÃû;Data Source=203.129.92.1"
Ïà¹ØÎĵµ£º
н¨±í£º
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
ɾ³ý±í£º
Drop table [±í ......
×î½üϵͳÔËÐÐÖз¢ÏÖAccess 2003 °æ±¾ÖжԴý Null ºÍ ‘’ £¨¿Õ×Ö·û£©Ææ¹ÖÎÊÌâ£¬ÖØÏÖ²½Ö裺
1¡¢´´½¨±ítabTest £»
2¡¢Ê¹ÓÃÉè¼ÆÊÓͼÌí¼ÓÁ½¸ö×Ö¶Î ID £¬col1
Ãû³Æ
ÀàÐÍ
³¤¶È
˵Ã÷
ID
Number
Ö÷¼ü£¬×ÔÔö
Col1
char
1
ÎÞ
3¡¢Ê¹ÓÃsql Ìí¼ÓÈçÏÂÊý¾Ý
-- col1 ×Ö¶ÎÉèÖÃΪ null
INS ......
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
using Microsoft.Win32;
using Access = Microsoft.Office.Interop.Access;
namespace ImageAccess
{
static class Program
{
......
ÔÚдÕâÆª²©ÎĵÄʱºò£¬ÎÒÕæµÄÈ̲»×¡½ÐÒ»Éù£¬ËûÂèµÄ±ä̬£¬½ñÌì×öÒ»¸öÍøÕ¾Ê±ºò£¬ÓÉÓÚÒªÓõ½ACCESS£¬ÄǾÍÓÃÁË£¬°Ñ֮ǰµÄÁ´½ÓÓï¾äCOPY+C¹ýÀ´
¿´¿´ÓÐʲôÎÊÌâ¡£
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source="+System.Web.HttpContext.Current.Server.MapPath("window2003.mdb");
Ò»¿´£¬Ó¦¸ÃûʲôÎÊÌ ......
ǰ¼¸ÌìÎªÖÆ×÷Ò»¸öÍøÕ¾£¬ÐèÒª´ÓACCESSתÖÁSQLSERVER£¬´ÓÍøÕ¾Éϲ鿴Á˺ܶàµÄ×ÊÁÏ£¬µ«¾õµÃûÓÐÒ»¸öÄܹ»È«Ã渲¸ÇÒªµãµÄ£¬ËùÒÔÎÒ×ܽáһϣ¬Ë³±ã
¸ø³öһЩ¾Ñé¡£
Ê×ÏÈÈç¹ûÒ»¿ªÊ¼¾ÍÐèÒªÖÆ×÷SQLSERVERµÄÍøÕ¾£¬ÄÇô×îºÃ½«ÄãµÄ°®»ú×°ÉÏWINDOWS2000»òÕß2003ÕâÑùµÄSERVER°æ£¬ÕâÑùµÄ°æ±¾ÊÇÖ§³Ö
SQLSERVERÕýʽ ......