Login | |
|
 |
error '80020009' - 2/22/2005 6:03:57 AM
|
|
 |
|
| |
zahid_a
Posts: 14
Score: 0
Joined: 2/16/2005
From: Canada
Status: offline
|
hi guyz... i get error '80020009'Exception occurred on line 48. i have highlighted the line but cant figure out the reason why it would give me this error. can anyone help me out please...any help would be highly appreciated. i am reading the information from database and comparing the names of the folder (because they are repeated) before printing them on the screen. to do so i am using the array and i have a doubt; that might be the reason for the error. thanks a lot for ur help... <% OPTION EXPLICIT %> <!-- METADATA TYPE = "typelib" FILE = "C:\Program Files\Common Files\System\ado\msado15.dll" --> <HTML> <HEAD> <TITLE> TRYING THE SHAPE & APPEND </TITLE> </HEAD> <BODY> <% Dim strSQL, objRS, objChild, strConnection, strSubcontents, inti, strarray(0) strarray(0) = 0 inti = 0 strSubcontents = Request.Form("SUBCONTENTS") strConnection = "Provider=MSDataShape;dsn=vertical;database=vertical final.mdb" strSQL = "SHAPE { SELECT folder, FileSummary, SeeAlso FROM mix WHERE subcontent LIKE '%" & strSubcontents & "%' ORDER BY folder}" & _ "APPEND ({ SELECT folder, subcontent FROM mix WHERE subcontent LIKE '%" & strSubcontents & "%'ORDER BY folder} AS Test RELATE folder to folder)" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open strSQL, strConnection Set objChild = Server.CreateObject("ADODB.Recordset") objChild.Open "mix", strConnection, adOpenStatic, adLockReadOnly, adCmdTable While Not objRS.EOF strarray(0) = CStr(objRS("folder")) Response.Write "<B>" & "Folder: " & "</B>" & objRS("folder") & "<BR>" Response.Write "<B>" & "File Summary: " & "</b>" & objRS("FileSummary") & "<BR>" Response.Write "<B>" & "See Also: " & "</b>" & objRS("SeeAlso") & "<BR>" Response.Write "<B>" & "Subcontents: " & "</b>" & "<BR>" Set objChild = objRS.Fields("Test").Value While Not objChild.EOF Response.Write " " & " " & " " & " " & objChild("subcontent") Response.Write "<br>" objChild.MoveNext Wend objRS.MoveNext Response.Write "<br>" & "<hr>" inti = inti + 1 While strarray(0) = Cstr(objRS("folder")) objRS.MoveNext Wend Wend Response.Write "There are " & inti & " records on this page." objRS.Close Set objRS = Nothing %> </BODY> </HTML>
_____________________________
zahid
|
|
| |
|
|
|
 |
Re: error '80020009' - 2/25/2005 2:47:14 AM
|
|
 |
|
| |
zahid_a
Posts: 14
Score: 0
Joined: 2/16/2005
From: Canada
Status: offline
|
hi guyz...i fixed the problem...apparently it was the while loop towards the end of the code, i just moved it to the beginning of the first while loop. here is the fixed code.. <% OPTION EXPLICIT %> <!-- METADATA TYPE = "typelib" FILE = "C:\Program Files\Common Files\System\ado\msado15.dll" --> <HTML> <HEAD> <TITLE> TRYING THE SHAPE & APPEND </TITLE> </HEAD> <BODY> <% Dim strSQL, objRS, objChild, strConnection, strSubcontents, inti, strArray inti = 0 strSubcontents = Request.Form("SUBCONTENTS") strConnection = "Provider=MSDataShape;dsn=vertical;database=vertical final.mdb" strSQL = "SHAPE { SELECT folder, FileSummary, SeeAlso FROM mix WHERE subcontent LIKE '%" & strSubcontents & "%' ORDER BY folder}" & _ "APPEND ({ SELECT folder, subcontent FROM mix WHERE subcontent LIKE '%" & strSubcontents & "%'ORDER BY folder} AS Test RELATE folder to folder)" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open strSQL, strConnection Set objChild = Server.CreateObject("ADODB.Recordset") objChild.Open "mix", strConnection, adOpenStatic, adLockReadOnly, adCmdTable strArray = 0 While Not objRS.EOF Do While objRS("folder") = strArray objRS.MoveNext Loop strArray = objRS("folder") Response.Write "<B>" & "Folder: " & "</B>" & objRS("folder") & "<BR>" Response.Write "<B>" & "File Summary: " & "</b>" & objRS("FileSummary") & "<BR>" Response.Write "<B>" & "See Also: " & "</b>" & objRS("SeeAlso") & "<BR>" Response.Write "<B>" & "Subcontents: " & "</b>" & "<BR>" Set objChild = objRS.Fields("Test").Value While Not objChild.EOF Response.Write " " & " " & " " & " " & objChild("subcontent") Response.Write "<br>" objChild.MoveNext Wend inti = inti + 1 objRS.MoveNext Response.Write "<br>" & "<hr>" Wend Response.Write "There are " & inti & " records on this page." objRS.Close Set objRS = Nothing %> </BODY> </HTML>
|
|
| |
|
|
|
| |
|
|
 |
|
 |
|
|