473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Strange Array problem

Hi

I have tried the following code on two differendt computers. It works
fine on one of them and on the other it's: Type mismatch: 'myVar' on
line 5

Here's the code:

Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)

I dont understand why?

The two computers have IIS and the following OS:

Windows 2000 Pro SP4 & Windows 2000 Server SP4
/JohnBon
Jul 19 '05 #1
5 1646
Is that all the code? That should work fine. Are you dimming myVar
elsewhere? Which line is line 5?

Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hi

I have tried the following code on two differendt computers. It works
fine on one of them and on the other it's: Type mismatch: 'myVar' on
line 5

Here's the code:

Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)

I dont understand why?

The two computers have IIS and the following OS:

Windows 2000 Pro SP4 & Windows 2000 Server SP4
/JohnBon

Jul 19 '05 #2
Yes, that is all the code. I made this example to isolate the fault.

Line 5 is: myVar(0) = "Hello!!"

/Johnbon

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<e#**************@TK2MSFTNGP09.phx.gbl>...
Is that all the code? That should work fine. Are you dimming myVar
elsewhere? Which line is line 5?

Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hi

I have tried the following code on two differendt computers. It works
fine on one of them and on the other it's: Type mismatch: 'myVar' on
line 5

Here's the code:

Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)

I dont understand why?

The two computers have IIS and the following OS:

Windows 2000 Pro SP4 & Windows 2000 Server SP4
/JohnBon

Jul 19 '05 #3
On my machine, I have no error. W2K Server SP3/IIS5, WSH 5.6.
Exact complete contents of my page from beginning to end:
<%
Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)
Set varObj = Nothing
%>
Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c**************************@posting.google.c om...
Yes, that is all the code. I made this example to isolate the fault.

Line 5 is: myVar(0) = "Hello!!"

/Johnbon

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<e#**************@TK2MSFTNGP09.phx.gbl>...
Is that all the code? That should work fine. Are you dimming myVar
elsewhere? Which line is line 5?

Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
Hi

I have tried the following code on two differendt computers. It works
fine on one of them and on the other it's: Type mismatch: 'myVar' on
line 5

Here's the code:

Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)

I dont understand why?

The two computers have IIS and the following OS:

Windows 2000 Pro SP4 & Windows 2000 Server SP4
/JohnBon

Jul 19 '05 #4
It started to work after I installed IE6 SP1. Maybe it was the WSH?

/Johnbon

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message news:<u0**************@TK2MSFTNGP09.phx.gbl>...
On my machine, I have no error. W2K Server SP3/IIS5, WSH 5.6.
Exact complete contents of my page from beginning to end:
<%
Class TestClass
public myVar(2)

public sub setTestClass
myVar(0) = "Hello!!"
end sub
End Class

set varObj = new TestClass
varObj.setTestClass

response.write varObj.myVar(0)
Set varObj = Nothing
%>
Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c**************************@posting.google.c om...
Yes, that is all the code. I made this example to isolate the fault.

Line 5 is: myVar(0) = "Hello!!"

/Johnbon

"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message

news:<e#**************@TK2MSFTNGP09.phx.gbl>...
Is that all the code? That should work fine. Are you dimming myVar
elsewhere? Which line is line 5?

Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
> Hi
>
> I have tried the following code on two differendt computers. It works
> fine on one of them and on the other it's: Type mismatch: 'myVar' on
> line 5
>
> Here's the code:
>
> Class TestClass
> public myVar(2)
>
> public sub setTestClass
> myVar(0) = "Hello!!"
> end sub
> End Class
>
> set varObj = new TestClass
> varObj.setTestClass
>
> response.write varObj.myVar(0)
>
>
>
> I dont understand why?
>
> The two computers have IIS and the following OS:
>
> Windows 2000 Pro SP4 & Windows 2000 Server SP4
>
>
> /JohnBon

Jul 19 '05 #5
Huh. Well, glad to hear it's working!

Ray at work

"JohnBon" <jo*******@hotmail.com> wrote in message
news:2c*************************@posting.google.co m...
It started to work after I installed IE6 SP1. Maybe it was the WSH?

/Johnbon

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
5
by: Rob Ristroph | last post by:
Hi, It's pretty unhelpful to post "I have a huge piece of code that crashes in strange places, what's the problem?" but that's basically my problem and I really am at my wit's end. The piece...
7
by: cppaddict | last post by:
Hi, I've been trying to debug a strange runtime error for the last 5 hours... I'm hoping someone might have an insight about it. I have an application that creates a vector of MyDisplay...
3
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
3
by: Sameh Halabi | last post by:
Hi I have a strange problem in C , I hope someone may help with it . the problem is as follows : I have an existing big structure (that I can't change) which contains in it groups of...
6
by: Edd Dawson | last post by:
Hi. I have a strange problem involving the passing of command line arguments to a C program I'm writing. I tried posting this in comp.programming yesterday but someone kindly suggested that I'd...
2
by: Bruno van Dooren | last post by:
Hi All, i have some (3) different weird pointer problems that have me stumped. i suspect that the compiler behavior is correct because gcc shows the same results. ...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
2
by: rkk | last post by:
Hi, My mergesort program is below. There is a small piece of logical error/bug in this code which I can't figure out, as a result the output array isn't completely sorted. Requesting your help...
5
by: MN | last post by:
Hi, I was writing a program that must dynamically allocate memory to a 2- dimensions array, initialize it to 0, then place the result of multiplication of two 1-dimension arrays as described in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.