I'm guessing the error is being caused by the fact that you don't appear to be dimensioning the variable "x" as an array anywhere, so it doesn't know that x is an array or whether i is a valid subscript of the array etc etc However, rather than looping through your recordset and manually assigning the values to an array I would look at the GetRows() method of the recordset as it can do what you want with one line of code and is much much more efficient. Using GetRows() is simple and there are loads of articles on the net which explain it... the following Google search will get you started :- http://www.google.co.uk/search?q=recordset+getrows Dan ________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Valter Sent: 02 November 2005 16:29 To: [email protected] Subject: [AspClassicAnyQuestionIsOk] run time error Microsoft VBScript (0x800A000D) - Type not corrispondent: 'x' I did wrote this code, but when I run it return me a run time error Microsoft VBScript (0x800A000D) - Type not corrispondent: 'x'. The line is 15 : x(i) = val("valore_quota") Here is the code: <%@ LANGUAGE="VBSCRIPT" %> <% Dim outpostDB Dim outpostDBPath stroutpostDBPath = Server.MapPath("../GestAlt/alternative.mdb") %> <% set outpostDB = Server.CreateObject("ADODB.Connection") outpostDB.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & stroutpostDBPath & ";" %> <% set val = outpostDB.Execute("Select valore_quota from valori where id = 1 and data_quota = #31/12/2004# ") i = 1 Do While Not val.EOF x(i) = val("valore_quota") i = i +1 val .MoveNext Loop %> <% set val2 = outpostDB.Execute("Select valore_quota from valori where id = 1 and data_quota =#30/09/2005# ") i = 1 Do While Not val.EOF y(i) = val2("valore_quota") i = i +1 val2.MoveNext Loop %> <% for j = 1 to i var_per(j) = ((y(j)/x(j))*100)-100 %> <td><%= var_per(j) %></td> <% next val2.Close set val2 = Nothing %> <% val.Close set val = Nothing %> <% outpostDB.Close set outpostDB = Nothing %> Is there anybody can help me out with this? Thanks Valter ________________________________ YAHOO! GROUPS LINKS * Visit your group "AspClassicAnyQuestionIsOk <http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk> " on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED] subscribe> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . ________________________________ [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
