MSDN中关于配置RDS服务的详细文档(配置完后需要重新启动):Configuring RDS on Windows 2000 If you experience difficulties getting RDS to function properly after upgrading to Windows 2000, follow the steps below to troubleshoot the issue. Make sure that the World Wide Web Publishing Service is running first by navigating to http://server using Internet Explorer. If you are unable to access the web server this way, go to a command prompt and enter the following command, "NET START W3SVC". From the Start menu, select Run. Type msdfmap.ini and click OK to open the msdfmap.ini file in Notepad. Check the [CONNECT DEFAULT] section, and if the ACCESS parameter is set to NOACCESS, change it to READONLY. Using the RegEdit utility, navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory\HandlerInfo" and make sure HandlerRequired is set to 0 and DefaultHandler is "" (Null string). Note If you make any changes to this section of the registry, you must stop and restart the World Wide Web Publishing Service by entering the following commands at a command prompt: "NET STOP W3SVC" and "NET START W3SVC".Using the RegEdit utility, navigate in the registry to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ADCLaunch" and verify that there is a key called RDSServer.Datafactory. If not, create it. Using Internet Services Manager, go to the Default Web Site and view the properties of the MSADC virtual root. Inspect the Directory Security/IP Address and Domain Name Restrictions. If the "Access is Denied" is checked then select "Granted". Be sure to try rebooting the server if the changes to do not appear to solve the problem at first.
除非三层...
告诉你,这样连不可以
看到一片资料上说,在connectionstring里的DBQ实际上是创建了一个临时ODBC数据源,那么是不是可以说,如果我能用ODBC数据源联到远程ACCESS上,我就应该可以让我程序里的ADOconnection联上呢?
RDS是微软的远程数据服务(Remote Data Service),需要在IIS中配置RDS服务,而配置很简单,只需要找到这个文件:C:\Program Files\Common Files\System\msadc\handunsf.reg,双击它注册即可。
你也可以手动配置RDS,详情可以看看MSDN的帮助。
RDS对象的使用,MSDN中也有详细说明。
编写Button1的OnClick事件如下: RDSConnection1.ComputerName := 'http://localhost';
RDSConnection1.Connected := True;
ADODataSet1.RDSConnection := RDSConnection1;
ADODataSet1.ConnectionString :=
'Provider=Microsoft.Jet.OLEDB.4.0;'+
'Data Source=d:\mydb.mdb;'+ //这是在服务器的d:盘存放的mydb.mdb文件
'Persist Security Info=False';
ADODataSet1.CommandText := 'Select * from Table1';
ADODataSet1.Open; //获取Table1的内容并显示在DBGrid中
下面的地址是MSDN关于RDS的主页面,你可以详细看看:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmscrdsapireference.asp
关键在于要配置好服务器IIS的RDS服务。
错误信息说 Eoleexception 还有
'Data Source=path\dbname.mdb;'
这句说path\dbname.mdb不是一个有效的路径,怀疑它是在本地找的,是IIS的问题吗?
可是我运行了C:\Program Files\Common Files\System\msadc\handunsf.reg了
If you experience difficulties getting RDS to function properly after upgrading to Windows 2000, follow the steps below to troubleshoot the issue. Make sure that the World Wide Web Publishing Service is running first by navigating to http://server using Internet Explorer. If you are unable to access the web server this way, go to a command prompt and enter the following command, "NET START W3SVC". From the Start menu, select Run. Type msdfmap.ini and click OK to open the msdfmap.ini file in Notepad. Check the [CONNECT DEFAULT] section, and if the ACCESS parameter is set to NOACCESS, change it to READONLY. Using the RegEdit utility, navigate to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory\HandlerInfo" and make sure HandlerRequired is set to 0 and DefaultHandler is "" (Null string). Note If you make any changes to this section of the registry, you must stop and restart the World Wide Web Publishing Service by entering the following commands at a command prompt: "NET STOP W3SVC" and "NET START W3SVC".Using the RegEdit utility, navigate in the registry to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ADCLaunch" and verify that there is a key called RDSServer.Datafactory. If not, create it. Using Internet Services Manager, go to the Default Web Site and view the properties of the MSADC virtual root. Inspect the Directory Security/IP Address and Domain Name Restrictions. If the "Access is Denied" is checked then select "Granted". Be sure to try rebooting the server if the changes to do not appear to solve the problem at first.