473,441 Members | 1,924 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,441 software developers and data experts.

Strange Select Case behaviour (2002)

I'm using VS2002 and getting a strange problem

dim reqd as string="#Required"
dim str as string
select case str
case reqd
end select

displays in the editor with a twiddly line under the case with the
error : 'If', 'ElseIf', 'Else', 'End If', or 'Const' expected."
and it wont compile for the same reason!
Any clues as to how to fix this (and we use a lot of acces97 so I cant
upgrade vs.net)

Nov 23 '05 #1
7 1010
<ma********@yahoo.com> schrieb:
I'm using VS2002 and getting a strange problem

dim reqd as string="#Required"
dim str as string
select case str
case reqd
end select

displays in the editor with a twiddly line under the case with the
error : 'If', 'ElseIf', 'Else', 'End If', or 'Const' expected."
and it wont compile for the same reason!


I do not have VS.NET 2002 installed, but the code compiles in VS.NET 2003.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 23 '05 #2
I've found out that its a feature of the editor and the partial
compilation of the edit checking:
I cut and pasted the #required from a db into an already very long file
and it appears something got left in the partial compilation area -
closing that file and re-openeing it cleared the problem

Nov 23 '05 #3
on 2002 I can reproduce it:
in a vb file add:
Public Class play
Public Function play()
#REQUIRED
End Function
End Class

wait till the #REQUIRED is marked as a problem
then add
dim str as string=' and the closing 'to get
Public Class play
Public Function play()
dim str as String ='#REQUIRED'
End Function
End Class
and it wont compile!!!

Nov 23 '05 #4
on 2002 I can reproduce it:
in a vb file add:
Public Class play
Public Function play()
#REQUIRED
End Function
End Class

wait till the #REQUIRED is marked as a problem
then add
dim str as string=" and the closing "to get
Public Class play
Public Function play()
dim str as String ="REQUIRED"
End Function
End Class
and it wont compile!!!

Nov 23 '05 #5
<ma********@yahoo.com> schrieb:
on 2002 I can reproduce it:
in a vb file add:
Public Class play
Public Function play()
#REQUIRED
End Function
End Class

wait till the #REQUIRED is marked as a problem
then add
dim str as string=' and the closing 'to get
Public Class play
Public Function play()
dim str as String ='#REQUIRED'
End Function
End Class
and it wont compile!!!

Well, the code is not actually valid! You'll have to use double quotation
marks to delimit the string instead of the single quotation marks.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 23 '05 #6
That was a typo - I'd asked the psot to be removed but to no avail!

Nov 23 '05 #7
<ma********@yahoo.com> schrieb:
That was a typo - I'd asked the psot to be removed but to no avail!


Okay. "news.microsoft.com" doesn't accept 'CANCEL' requests.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 23 '05 #8

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

Similar topics

0
by: Ethel Aardvark | last post by:
I am running a 9.0.1 database on a W2K server and have come across some strange behaviour with a SQL query. I have a query which runs in a PL/SQL cursor which has several PL/SQL variables used to...
0
by: Neculai Macarie | last post by:
Hi! Using Union and Order By gives strange behaviour in the following test-case: drop table if exists gallery; drop table if exists gallery_categ; # create test tables create table gallery...
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. ...
10
by: Mark Barinstein | last post by:
Hello. W2K, db2 v7, fp11. Given: create table pays ( acode integer not null, packno smallint not null, sum decimal(15, 2) not null
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
8
by: Lauren Wilson | last post by:
Hi Folks, We have a solid, five year old Access app that is suddenly behaving oddly after conversion to Access 2002/2003 format. Everything seems to run OK except for a few oddities. The code...
0
by: theintrepidfox | last post by:
Dear Group I came accross a very annoying behaviour of Visual Studio, giving me six hours of headache till I found the solution. This post is mainly for fellow developers for reference as it...
3
by: annecarterfredi | last post by:
I was getting snapshot since the database was responding very slow...here is the query that was in a snapshot: WITH TYPEINTS ( TYPEINT, COLTYPE ) AS ( VALUES ( SMALLINT(1 ), CHAR( 'INTEGER', ...
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.