<script language="vbscript">
on error resume next
msgbox "aaa"
Dim conn
Set conn = CreateObject("ADODB.Connection")
'控制面板建立odbc数据源aa
conn.connectionString = "Data Source=aa;Initial Catalog=xgycc;User Id=zzxgy;Password=zzxgyxgy;"
conn.Open
dim rs
Set rs = CreateObject("adodb.recordset")
dim sql
sql="select * from xms_hotph"
rs.Open sql, conn, 1, 3
rs.MoveFirst
Do Until rs.EOF
'msgbox rs("type")
document.write(rs("type") & " " & rs("phnumber") & "<br>")
rs.MoveNext
Loop
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
</script>
on error resume next
msgbox "aaa"
Dim conn
Set conn = CreateObject("ADODB.Connection")
'控制面板建立odbc数据源aa
conn.connectionString = "Data Source=aa;Initial Catalog=xgycc;User Id=zzxgy;Password=zzxgyxgy;"
conn.Open
dim rs
Set rs = CreateObject("adodb.recordset")
dim sql
sql="select * from xms_hotph"
rs.Open sql, conn, 1, 3
rs.MoveFirst
Do Until rs.EOF
'msgbox rs("type")
document.write(rs("type") & " " & rs("phnumber") & "<br>")
rs.MoveNext
Loop
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
</script>