讓asp搭配mysql
所需要工具
mysql-4.1.11-win32
myodbc-3.51.11-1-dll
myodbc-3.51.11-1-win
mysqlcc-0.9.4-win32
註冊檔案mydbc.reg
regedit4
[hkey_local_machinesoftwareodbcodbcinst.inimyodbc driver]
"usagecount"=dword:00000002
"driver"="c:\windows\system\myodbc.dll"
"setup"="c:\windows\system\myodbc.dll"
"sqllevel"="1"
"fileusage"="0"
"driverodbcver"="03.51"
"connectfunctions"="yyy"
"apilevel"="1"
"cptimeout"="120"
[hkey_local_machinesoftwareodbcodbcinst.iniodbc drivers]
"myodbc driver"="installed"
建立asp檔案鏈結資料庫
例子如下
windows dsn name: 所要建立dsn的名稱
mysql host (name or ip):mysql伺服器的名稱或者是ip位址,通常填localhost
mysql database name: admin
database: admin
password: 000000
port(if not 3306):
sql command on connect:
下面兩種鏈結資料庫的asp**
1. 使用dsn
strconnection = "dsn=admin;driver=;server=localhost;uid=root;pwd=000000;database=admin"
set adodataconn = server.createobject("adodb.connection")
adodataconn.open strconnection
strquery = "select * from user"
set rs = adodataconn.execute(strquery)
if not rs.bof then
username
password
do while not rs.eof
rs.movenext
loop
else
response.write("sorry, no data found.")
end if
rs.close
adodataconn.close
set adodataconn = nothing
set rsemaildata = nothing
2. 不使用dsn
strconnection="defaultdir=;driver=;database=admin"
set adodataconn = server.createobject("adodb.connection")
adodataconn.open strconnection
strquery = "select * from user"
set rs = adodataconn.execute(strquery)
if not rs.bof then
username
password
do while not rs.eof
rs.movenext
loop
else
response.write("sorry, no data found.")
end if
rs.close
adodataconn.close
set adodataconn = nothing
set rsemaildata = nothing
asp登入註冊mysql 讓ASP搭配MYSQL
讓asp搭配mysql 讓asp搭配mysql 所需要工具 mysql 4.1.11 win32 myodbc 3.51.11 1 dll myodbc 3.51.11 1 win mysqlcc 0.9.4 win32 註冊檔案mydbc.reg regedit4 hkey local machi...
asp 讓你知道codepage的重要
這幾天研究utf 8編碼,太暈了,把我的看法和各位討論討論。歡迎來批啊。以下都是我的想法,有不對的請不吝賜教,幫忙指出來。一 作業系統 window系統內部都是unicode的。資料夾名,檔名等都是unicode的,任何語言系統下都能正常顯示。二 輸入法 微軟拼音輸出的是unicode的,智慧型ab...
asp 讓你知道codepage的重要
這幾天研究utf 8編碼,太暈了,把我的看法和各位討論討論。歡迎來批啊。以下都是我的想法,有不對的請不吝賜教,幫忙指出來。一 作業系統 window系統內部都是unicode的。資料夾名,檔名等都是unicode的,任何語言系統下都能正常顯示。二 輸入法 微軟拼音輸出的是unicode的,智慧型ab...