<% Set ObjDB=Server.CreateObject("ADODB.Connection")
ObjDB.Open "DSN=ip; UID=cat; PWD=cat"
intype=request.form("in")
number=request.form("input") %>
<% if intype = "IP "Then
Set ObjRS=Server.CreateObject("ADODB.Recordset")
strSQL="select Name from IP where IPAddress = number "
Set ObjRS=Server.execute(strSQL)
response.write ObjRS("Name")
else
do
Set ObjRS2=Server.CreateObject("ADODB.Recordset")
strSQL="select Distinct IPNet.IP ,Parent.IPNet from IP,IPNet where (IPNet.Ip=IPNet.IPNet) and (Parent.IPNet='intype') "
Set ObjRS2=Server.execute(strSQL)
response.write ObjRS2("IPNet.IPNet")
if ObjRS2("NoIP" )=1 then
response.write ObjRS2("IP.IPAddress")
response.write ObjRS2("IP.Name")
end if
loop
end if%>
tikky
strSQL-
<HR WIDTH=75%>
<br><br><a href = "../IP/index.html">ต้องการดูข้อมูลตัวอื่น</a>
<br><br><a href = "../IP/logout.html">ออกจากระบบ</a>
ลองเปลี่ยน
Set ObjDB=Server.CreateObject("ADODB.Connection")
ObjDB.Open "DSN=ip; UID=cat; PWD=cat"
เป็น
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "DSN=ip; UID=cat; PWD=cat"
ไม่แน่ใจนะลองดูแล้วกันค่ะ
Date :
17 May 2547 19:41:07
By :
jumbo
No. 3
Guest
<% Set ObjDB=Server.CreateObject("ADODB.Connection")
ObjDB.Open "DSN=ip; UID=cat; PWD=cat"
intype=request.form("in")
number=request.form("input") %>
<% if intype = "IP "Then
Set ObjRS=Server.CreateObject("ADODB.Recordset")
strSQL="select Name from IP where IPAddress = "&number&" "
Set ObjRS=Server.execute(strSQL)
response.write ObjRS("Name")
else
do
Set ObjRS2=Server.CreateObject("ADODB.Recordset")
strSQL="select Distinct IPNet.IP ,Parent.IPNet from IP,IPNet where (IPNet.Ip=IPNet.IPNet) and (Parent.IPNet='intype') "
Set ObjRS2=Server.execute(strSQL)
response.write ObjRS2("IPNet.IPNet")
if ObjRS2("NoIP" )=1 then
response.write ObjRS2("IP.IPAddress")
response.write ObjRS2("IP.Name")
end if
loop
end if%>
tikky
strSQL-
<HR WIDTH=75%>
<br><br><a href = "../IP/index.html">ต้องการดูข้อมูลตัวอื่น</a>
<br><br><a href = "../IP/logout.html">ออกจากระบบ</a>