|
<SCRIPT language=VBScript>
Set cn = CreateObject("ADODB.Connection")
strConnection = "DSN=MYSQL;UID=root;PWD="
cn.Open strConnection
Set rs = CreateObject( "ADODB.Recordset" )
SqlQuery = "show databases"
rs.Open SqlQuery, cn
document.write "<TABLE border=1 cellpadding=5 bgcolor=white>"
document.write "<TR><TD bgcolor=skyblue>" & rs.Fields( 0 ).Name & "</TD></TR>"
Do while not rs.EOF
document.write "<TR><TD>" & rs.Fields( 0 ).Value & "</TD></TR>"
rs.MoveNext
Loop
document.write "</TABLE>"
rs.Close
cn.Close
</SCRIPT>
| |