|
-
Aug 27th, 2003, 06:04 AM
#1
Thread Starter
New Member
help in debugging
hai guys this is a asp code and help me to debug it
<html>
<body>
<%response.contenttype = "text/html" %>
<%request.querystring ('searchstring') %>
<%
Dim sResult
Sub Label1_Click()
'Execute Query
Set conn = CreateObject("ADODB.Connection")
OnErrorExit "Error creating object: ADODB.Connection"
Set cmd = CreateObject("ADODB.Command")
OnErrorExit "Error creating object: ADODB.Command"
Set rs = CreateObject("ADODB.RecordSet")
OnErrorExit "Error creating object: ADODB.Recordset"
conn.ConnectionString = "provider=msdaipp.dso"
conn.CommandTimeout = 0
conn.Open "http://kneserver4.wipro.com/kmtest/documents/Traniee", "tr7253","venkisgeethu"
OnErrorExit "Error opening connection"
Set cmd.ActiveConnection = conn
cmd.CommandText = "select ""DAV:displayname"" from scope('deep traversal of ""/kmtest/documents/Traniee""') where freetext('workspace')"
OnErrorExit "Error setting command properties"
rs.Open cmd
OnErrorExit "Error executing query"
dumprowset rs
End Sub
Sub dumprowset(rs)
Label1.Visible = False
Dim i, j
Dim s
While Not rs.EOF
' sResult(i) = ""
'sHead = i & ") "
For j = rs.Fields.Count - 2 To rs.Fields.Count - 1
sResult = rs(j).Value & vbclrf
List1.AddItem sResult
Next
rs.MoveNext
Wend
'MsgBox i & " Results."
End Sub
%>
dim array(),i
strHTML = strHTML & "<SELECT>"
for i=1 to aray.length
strHTML = strHTML & "<OPTION value=""" & array(i) & """>""" & array(i) & """</OPTION>"
next i
strHTML = strHTML & "</SELECT>"
response.write strHTML
%>
</body>
</html>
--------------------------------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|