远程连接access数据库的几个方法:
使用了TCP/IP,ADO及XML(需要安装Microsoft XML 4.0。)。分服务器和客户端两部分,服务器可以多用户同时连接。远程连接Access数据库有很多方法,我以前已经比较具体的回答过(见下面所列的5种方法),我现在这个例子属于其中的第3种方法(不需要使用RDS或Web服务器)。
远程连接access数据库的几个方法:
1.建立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"
2.把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", ""
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=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 [表 ......
在SQL Server中模糊查询通常是这样的Select * from articleTable where authorName like '%jacky%'
但是在Access中用这条语句执行的时候竟然发现查不出结果,怎么可能呢?
后来查了下资料,发现问题如下:
要进行模糊查找,则必须使用通配符,ACCESS库的通配符和SQL SERVER的通配符不一样。
ACCESS库的通配符为:
*& ......
<?php
$connstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("data.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC);
$issuetime=date("Y-m-d H:i:s");
$sql="insert into test values("","",...)";
$result=odbc_exec($connid,$sql);
if($result) echo "successful";
else ec ......
转帖:http://www.stealthcopter.com/blog/2010/01/android-requesting-root-access-in-your-app/
This snippet shows how root access can be requested inside an application in order to write a file into a place we do not have permission to access usually. Requesting root access will only work if your phon ......
asp 中文乱码,asp access 乱码,asp 刷新后乱码,asp utf 8乱码,ajax 乱码 asp,asp 汉字乱码,asp乱码怎么办
用utf-8编码用在新的网站上,不想问题还真多,所以找了些文章,帖子,看了看,等下有用的就贴下面了。
今天,我开始把 CODEPAGE="936" 改成 CODEPAGE="65001"
把charset=gb2312改成 charset=utf-8
可是还是乱码 ......