Login | |
|
 |
Re: ASP & MS Access - 3/3/2005 5:29:06 AM
|
|
 |
|
| |
zahid_a
Posts: 14
Score: 0
Joined: 2/16/2005
From: Canada
Status: offline
|
i tried what u suggested... by inserting the "IF statement" right above the code. since i am using "objCommand" i included the statement right into the "objCommand.Text" & also tried it outside. But in both the cases it throws the server into some unkown process and the memory gets filled up...and eventually i have to restart the web server. any thoughts on this??? <% OPTION EXPLICIT %> <!-- #INCLUDE FILE = 'connection.asp' --> <!-- METADATA TYPE = "typelib" FILE = "C:\Program Files\Common Files\System\ado\msado15.dll" --> <HTML> <HEAD> <TITLE> TEST </TITLE> </HEAD> <BODY> <% On Error Resume Next Dim objRS, objCommand, strFolder, strTemp, strArray strFolder = Request.Form("FOLDER") Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open "mix", Conn, adOpenForwardOnly, adLockReadOnly, adCmdTable Set objCommand = Server.CreateObject("ADODB.Command") objCommand.ActiveConnection = Conn objCommand.CommandText ="SELECT Folder, SeeAlso, FileSummary, subcontent FROM mix WHERE Folder LIKE '%" & strFolder & "%' ORDER BY Folder" objCommand.CommandType = adCmdText Set objRS = objCommand.Execute strTemp = objRS("folder") strArray = 0 While Not objRS.EOF Response.Write "Folder: " & objRS("folder") & "<br>" strArray = objRS("folder") Response.Write "See Also: " & objRS("SeeAlso") & "<br>" Response.Write "Subcontents: " While objRS("folder") = strArray Response.Write objRS("subcontent") & "<br>" objRS.MoveNext Wend Response.Write "<br>" & "<br>" objRS.MoveNext Wend objRS.Close Set objRS = Nothing Set objCommand = Nothing %> </body> </html>
|
|
| |
|
|
|
|
|