请问在win2k中如何设置mysql的系统DNS。

thirdfeel 2003-08-21 05:18:53
请问在win2k中如何设置mysql的系统DNS。
...全文
47 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
WalkSing 2003-08-22
  • 打赏
  • 举报
回复
download myodbc
http://walksing.dns0755.net/bbs/application/webpub/mls.asp?PP=h:\backup\walksing\tools\appDrvs&UP=/public/appDrvs
<%
'/**
'===============================================================================
'* Title: Database.asp
'* Description:Member manager & register ,login
'this is for access from jsp to asp
'when login from jsp and checked ,
'here don't need to check it again.
'* Copyright: Copyright (c) 2002
'* @update: Wednesday, August 13, 2003
'* @create: 2003-3-11 19:24:44
'* @author: walksing@hotmail.com
'* @version: 1.2.0
'add dbType in 1.1.0,dbType:access,mssql
'add getRoot
'==============================================================================
'*/

'CHECK IS SESSSION ALIVE ,FROM DB


class Database
dim conn
dim connStr
dim msg
dim dbType

dim cfgMssql_url
dim cfgAccess_url
dim cfgMysql_url
dim MainRoot
dim AppRoot
dim UappRoot
private sub Class_Initialize
'default
if(MainRoot = "" or AppRoot = "" or UappRoot = "") then getRoot
cfgMssql_url = "Provider=sqloledb;Data Source=localhost;Initial Catalog=travelMember;User ID=sa;Password=walksingcabmysqladm;"
cfgAccess_url = "DBQ=" & server.mappath(MainRoot& "/database/webMember030214008.asa")& ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
cfgMysql_url = "Driver={MySQL};Server=localhost;UID=webroot;PWD=mysql$com;Database=webmember" 'need myODBC driver
setDBType("mssql")
end sub

'env config
public function getRoot()
dim u_script_name
u_script_name = request("script_name")
u_script_name = mid(u_script_name, 2)
MainRoot = "/" & mid(u_script_name, 1, instr(u_script_name,"/")-1)
AppRoot = mainRoot & "/application"
UappRoot = "http://"&request("HTTP_HOST") &":"& request("SERVER_PORT")&AppRoot
end function

public function setURL(str)
connStr = str
end function

public function setDBType(stype)
dbType = stype
dbType = lcase(dbType)
if(dbType = "") then
dbType = "mssql"
end if

if( dbType = "mssql" ) then
connStr = cfgMssql_url
elseif dbType = "access" then
connStr = cfgAccess_url
elseif dbType = "mysql" then
connStr = cfgMysql_url
end if

end function

public function open()
on error resume next
set conn = server.createobject("adodb.connection")
conn.open connStr
if err.number <> 0 then
open = false
else
open = true
end if
end function

public sub close
if (conn <> "") then
conn.close()
conn = null
end if
end sub

end class

%>
thirdfeel 2003-08-21
  • 打赏
  • 举报
回复
能不能说得清楚一点, 再加80分
xuzuning 2003-08-21
  • 打赏
  • 举报
回复
先安装mysqlobdc

21,882

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧