Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


error '80020009'

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,2132
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> error '80020009'
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 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
 
 
Post #: 1
 
 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>

(in reply to zahid_a)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> error '80020009' Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts