|
-
Nov 1st, 2000, 04:42 AM
#1
Thread Starter
Member
Can someone tell me what the correct way of writing this would be, it's driving me nuts :
If rs("nodename") NOT = "Home" Then
Thanks in advance
Ian.
-
Nov 1st, 2000, 04:46 AM
#2
Fanatic Member
If rs("nodename") NOT = "Home" Then
should be:
Code:
if UCase(rs.Fields("nodename")) <> "HOME" Then
the above guarantees that the case issue is resolved, (and i'm assuming it's a field)
HTH
Crispin
VB6 ENT SP5
VB.NET
W2K ADV SVR SP3
WWW.BLOCKSOFT.CO.UK
[Microsoft Basic: 1976-2001, RIP]
-
Nov 1st, 2000, 04:48 AM
#3
Code:
If Not rs("nodename") = "Home" Then
'or
If rs("nodename") <> "Home Then
'when you read data from a DB the string might return extra
'spaces or it might contain null values which VB won't
'recognize as a string so you should type it in the
'following manner instead
If Trim$(rs("nodename") & "") <> "Home" Then
Good luck!
-
Nov 1st, 2000, 02:44 PM
#4
personally i like to do it this way...
with a bang(!)
Code:
If Trim$(rs!nodename) <> "Home" Then
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|