Use IE to call RDS to implement remote data inventory

zhaozj2021-02-17  47

Database applications on interconnects use a web background database, with an embedded scripting language programming of ASP, PHP, JSP, and programmed back-end access. In fact, applying Microsoft's RDS (Remote Data Service Remote Data Services) can also perform database access to the web server side, which is more simple. And this technology general news magazine introduction is relatively small. RDS is an ActiveX component published by Microsoft as an IE4.01, which is responsible for access to remote databases in the network system. Different from database access components such as ASP, RDS is not working on the web server side, but calls the browser local component function, realizes the real remote data access, so when the database is accessed, the server's IP address must be provided. And the absolute path of the database, finally taken the data back to the browser side by SQL query statement. More enjoyable, browser-end data is displayed, and it is very simple by "binding RDS as a data source as the normal form of the data source as the Normal form as the ASP script. Script language control, data will be displayed in the table. (The table in the page, our general usage is to control the page typography, layout.) And the usual ActiveX component, RDS components use You can also page display data, where datapagesize = "6" means one Page form displays 6 records. The syntax of field variable data is displayed in the table "" Div DataFLD = "Field Name">. In this example, the button "Open Database" calls the VB script OpenDB () process, passes the parameters such as the IP address, database path, SQL query statement to RDS1, then call the RDS1 Refresh method to retrieve the data in Table CHENG_JI. The four buttons below the table call the page page function to view the data before. Setting the paging function to a large number of data can be effectively buffered, and the data traffic of the network can also be balanced. This example implements a query function of a student transcript. The table structure of the transcript in Test_db.mdb is: xing_ming text 'Name xue_hao text' Learn YU_WEN Number 'Language SHU_XUE Digital' Mathematics Ying_YU Digital 'English MEI_SHU Number' Art JI_SUAN_JI Digital 'Computer HTML code is as follows, the results of the query are shown. This example runs through the first version of Windows98.

grades </ title> </ head> <body bgcolor = "# Fffffff "> <center> <font color = red size = 5> Receive </ font> </ center> <hr> <form name =" form1 "> <table border =" 0 "align =" center "> < Tr> <TD Align = "Right"> server IP address: </ td> <td> <! - Defined server IP address: -> <input type = "text" size = "50" name = "server" value = "http://192.168.0.100> </ td> </ tr> <tr> <td align =" right "> database path: </ td> <td> <! defined server-side database path: - -> <input type = "text" size = "50" name = "dbq" value = "c: /tmp/test_db.mdb> </ td> </ tr> <tr> <td align =" right " > SQL query statement: </ td> <td> <! Defined SQL query statement: -> <input type = "text" size = "50" name = "sql" value = "select * from Cheng_ji"> < / TD> </ tr> <tr> <TD align = "center" colspan = "2"> <input type = "" value = "Opens Database" οnclick = "OPENDB ()> </ td> </ Tr> </ form> </ table> <hr width = "80%> <table align =" center "width =" 400 "border =" 1 "cellspacing = 0ID =" cheng_ji "DatasRC =" # rds1 "DataPageSize = "6"> <THEAD> <TD BGCOLOR = "# 00fff"> Name </ TD> <TD BGColor = "</p> <p># 00fffff>> Study No. </ TD> <TD BGColor = "# 00fff"> Language </ TD> <TD BGColor = "# 00fff"> Mathematics </ TD> <TD BGColor = "# 00fff"> English </ TD> <TD BGCOLOR = "# 00fff"> Art </ TD> <TD BGColor = "# 00fff"> Computer </ TD> </ TR> </ TD> <TBODY> <Tr> <TD> <Div Datafld = "xing_ming"> </ div> </ td> <td align = "center"> <div datafld = "xue_hao"> </ div> </ td> <td align = "right"> <div datafld = " YU_WEN> </ div> </ td> <td align = "limited"> <div datafld = "shu_xue"> </ div> </ td> <td align = "right"> <div datafld = "ying_yu" > </ Div> </ td> <td align = "right"> <div datafld = "mei_shu"> </ div> </ td> <td align = "right"> <div datafld = "ji_suan_ji"> < / Div> </ td> </ TR> </ tbody> </ table> <br> <center> <input type = "value =" first "οnclick =" cheng_ji.firstpage ()> < INPUT TYPE = "Button" Value = "<< Previous" οnclick = "" οnclick = "> <input type =" "value =" next page >> "οnclick =" cheng_ji.nextpage () " > <input type = "Button" value = "last page" οnclick = "cheng_ji.lastpage ()"> </ center> <hr> <object id = RDS1 "classid =" CLSID: BD96C556-65A3-11D0- 983A-00C04FC29E33 "Align =" Baseline "> </ Object> <script language =" vbscript "></p> <p>Sub OpenDB () rds1.server = form1.server.valuerds1.connect = "driver = {Microsoft Access Driver (* .mdb)}" & "; dbq =" & form1.dbq.valuelDS1.SQL = form1.sql.valuerDS1 .Refreshend sub </ script> </ body> </ html> Zhang Qingzhangking@263.nethttp: //soft.why100000.com</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-28923.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="28923" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.041</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'ouFosPEBHQ_2FsthgjSVJxzCib7ouEzp61n1Tt8e_2F8_2FCrASyjJrggq7_2BozYNjESlwYTr1iDrl2XuC5YgrvYLH3mg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>