這里是 DSN-Less 連接! |
|
<%
Dim my_conn, strSQL
Set my_conn = createobject("ADODB.Connection")
my_conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_ & "SERVER=localhost;"_ & "DATABASE=tutorialdb;"_ & "UID=root;PWD=; OPTION=35;"
strSQL = "SELECT * FROM UserEmails"
Set rs = conn.Execute(strSQL)
Do while not rs.eof ' Do until it reaches end of db
Response.Write "User ID# " & rs("userID") & "<br>" Response.Write "Name: " & rs("name") & "<br>" Response.Write "Email: " & rs("email") & "<br>"
rs.MoveNext loop
my_conn.close Set my_conn = nothing %> |
出處:藍(lán)色理想
責(zé)任編輯:夢覺
上一頁 MySQL & ASP[3] 下一頁
◎進(jìn)入論壇網(wǎng)絡(luò)編程版塊參加討論
|