Remote Data Service (RDS) The Remote Data Service is a more sophisticated DSO that ships with Internet Explorer 4.0. RDS obtains its data from a database using OLE-DB or ODBC. Consider using RDS if: You have existing data in an OLE-DB or ODBC-compliant database management system (DBMS) such as SQL Server, Microsoft® Access, or Oracle. You want to specify the data using an SQL statement. You need to provide update, insert, and delete capabilities. You want direct, real-time access to the data. A declaration specific to RDS is as follows: <OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID=dsoComposer HEIGHT=0 WIDTH=0> <PARAM NAME="Server" VALUE="http://musicserver"> <PARAM NAME="Connect" VALUE="dsn=music;uid=guest;pwd="> <PARAM NAME="SQL" VALUE="select compsr_name from composer"> </OBJECT>First, note the class identifier (CLSID) specific to RDS. Every ActiveX component requires a CLSID to differentiate it from other objects registered on the system. Next, note that the base properties exposed by RDS differ significantly from those exposed by the TDC. That's because the TDC derives its data from a flat text file, while the RDS is capable of retrieving and updating data from any OLE-DB or ODBC-compliant database. The following are the properties specified in the example declaration above.Server String identifying the protocol and the server that supplies the data. Connect Standard ODBC connection string identifying the data source name configured on the server. SQL SQL query identifying the table and columns to be selected from the database. For the specifics on how to use RDS, see the RDS Documentation .
The Remote Data Service is a more sophisticated DSO that ships with Internet Explorer 4.0. RDS obtains its data from a database using OLE-DB or ODBC. Consider using RDS if: You have existing data in an OLE-DB or ODBC-compliant database management system (DBMS) such as SQL Server, Microsoft® Access, or Oracle.
You want to specify the data using an SQL statement.
You need to provide update, insert, and delete capabilities.
You want direct, real-time access to the data.
A declaration specific to RDS is as follows: <OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
ID=dsoComposer HEIGHT=0 WIDTH=0>
<PARAM NAME="Server" VALUE="http://musicserver">
<PARAM NAME="Connect" VALUE="dsn=music;uid=guest;pwd=">
<PARAM NAME="SQL" VALUE="select compsr_name from composer">
</OBJECT>First, note the class identifier (CLSID) specific to RDS. Every ActiveX component requires a CLSID to differentiate it from other objects registered on the system. Next, note that the base properties exposed by RDS differ significantly from those exposed by the TDC. That's because the TDC derives its data from a flat text file, while the RDS is capable of retrieving and updating data from any OLE-DB or ODBC-compliant database. The following are the properties specified in the example declaration above.Server String identifying the protocol and the server that supplies the data.
Connect Standard ODBC connection string identifying the data source name configured on the server.
SQL SQL query identifying the table and columns to be selected from the database. For the specifics on how to use RDS, see the RDS Documentation .
1.在ASP中可以通过javascript打开一个ADO对象来读取数据记录;也可以在浏览器打开一个ADO对象访问远程数据库
2.如果使用JSP,JRun和Resin都支持在服务器端编译运行javascript,这个是通过使用java.sql包里面的Connection、RecordSet来访问数据库更详细的部分,还得阁下亲躬才行呀
<HTML>
<BODY>
<TITLE>ASP+JSCRIPT</TITLE>
<SCRIPT LANGUAGE="JSCRIPT" RUNAT="Server">
Response.write('<TABLE border="1" cellspacing="0" cellpadding="0">');
var sSQL = 'SELECT * FROM authors';
var oConn= new ActiveXObject("ADODB.Connection");
oConn.Open('Provider=SQLOLEDB;Server=(local);Database=pubs;UID=sa;PWD=;');
var rs = oConn.Execute(sSQL);
var i;
Response.write('<tr>');
for (i = 0; i < rs.Fields.Count - 1; i++)
{
Response.write('<td>' + rs(i).Name + '</td>');
}
Response.write('</tr>');while (!rs.EOF)
{
Response.write('<tr>');
for (i = 0; i < rs.Fields.Count - 1; i++)
{
Response.write('<td>' + rs(i).Value + '</td>');
}
Response.write('</tr>');
rs.MoveNext();
}
rs.Close();
oConn.Close();
rs=null;
oConn = null;
Response.write('</TABLE>');
</SCRIPT>
</BODY>
</HTML>
静态页面不可能实现