-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtesting2.asp
executable file
·66 lines (51 loc) · 1.31 KB
/
testing2.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html>
<body>
<table align="left" border="0" width="200">
<tr>
<td align="center">
<font size="20">SSL v.3</font><br>
Super Spy Lookup Version 3
</td>
</tr>
</table>
<Br><Br><Br><Br><Br><Br>
<table border="0"
<tr>
<td align="left">
<h3>NOC List Search Results</h3>
<%
'Sample Database Connection Syntax for ASP and SQL Server.
Dim oConn, oRs
Dim qry, connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
Dim my_search
id = Request("id")
db_server = "LVA"
db_name = "MyAppDB"
db_username = "MyPublicUser"
db_userpassword = "MyPassword!"
fieldname = "ID"
tablename = "noclist"
connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" & db_name & ";UID=" & db_username & ";PWD=" & db_userpassword
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
'standard search query
qry = "SELECT * FROM " & tablename & " WHERE ID = " & Request("id")
'qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
Do until oRs.EOF
Response.Write "<strong>ID:</strong> " & oRs.Fields("id") & "<br>"
Response.Write "<strong>Title: </strong>" & oRs.Fields("spyname") & "<br>"
Response.Write "<strong>User: </strong>" & oRs.Fields("realname") & "<br><br>"
oRS.MoveNext
Loop
oRs.Close
Set oRs = nothing
Set oConn = nothing
%>
</td>
</tr>
</table>
</body>
</html>