Salin kod Kod adalah seperti berikut: //Gunakan JavaScript untuk menulis contoh kod untuk sambungan bahagian pelayan ke pangkalan data <BR> var conn = new ActiveXObject("ADODB.Connection"); .mdb;DRIVER={Microsoft Access Driver (*.mdb)};"); <BR> var rs = new ActiveXObject("ADODB.Recordset"); <BR> var sql="select * from friends_infor"; <BR> rs.open(sql, conn); <BR> shtml = "<lebar jadual='100%' sempadan=1>"; <br> shtml +="<tr bgcolor='#f4f4f4'> ;td>au_id</td> ;<td>au_lname</td><td>au_fname</td></tr>"; <br> sambil(!rs.EOF;) { ; td>" + rs("friend_id") + "</td><td>" + rs("friend_name") + "</td><td>" + rs("friend_nickname" ) + " </td></tr>"; <br>rs.moveNext; <br> } <br> shtml += "</table>"; <br> rs.close(); <br> rs = null; <br> conn.close(); <br> conn = null;</div>