|
-
Aug 9th, 2002, 02:55 AM
#1
Thread Starter
Frenzied Member
RESOLVED .Empty string, Null string, How to evaluate
Placed my question in ActiveX board.
But no one is looking over there.
My question
Thanks for helping me out.
Last edited by swatty; Aug 9th, 2002 at 04:01 AM.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Aug 9th, 2002, 03:21 AM
#2
Well ...
Why do you want to use String * 3? Why not simply use a string type?
Also Len(Trim(Me.Journal)) = 0 should tell you if the property contains something or not. IsNull() is ridiculous here as it is used for checking if a database field contains a null value.
.
-
Aug 9th, 2002, 03:30 AM
#3
Thread Starter
Frenzied Member
In the land ....
It is containing 3 which are placed there by vb when initializing my object.
I am using * 3 because my length in db is set to 3 .
That way no matter how long the string is which is given to the property I only get the first 3 chars, what is good for me.
Doesn't want to get a type mismatch when storing them values.
That is why.could be , I am trying to get a correct evaluation .
Last edited by swatty; Aug 9th, 2002 at 03:33 AM.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Aug 9th, 2002, 04:02 AM
#4
Thread Starter
Frenzied Member
Little less conversation, little more action
Found it.
Thanks to whom helped me.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Aug 9th, 2002, 04:10 AM
#5
Well ...
Originally posted by swatty
It is containing 3 which are placed there by vb when initializing my object.
I am using * 3 because my length in db is set to 3 .
That way no matter how long the string is which is given to the property I only get the first 3 chars, what is good for me.
Doesn't want to get a type mismatch when storing them values.
That is why.
could be , I am trying to get a correct evaluation .
If you want to take out only the first three characters, you can use something like Left(mJournal,3). Using a fixed length string could be a bad idea. Also if you have implemented your application design correctly, your database simply won't have any values that exceed three characters, so your precaution here is unnecessary.
Another option is that after you declare the string mJournal as String * 3, you assign an empty string to it yourself, like
mJournal = ""
If you had declared it simply as a string, you probably wouldn't need it.
Anyways, since your problem has been resolved, I think I can only wish you best luck. 
.
-
Aug 9th, 2002, 04:18 AM
#6
Thread Starter
Frenzied Member
My database hasn't got wrong values.
Because i make my application appropriate.
When i distribute my dll which contains the classes i've made , I must be sure the ones using them do not give me more than i need. No one must have the opportunity to let my dll crash the program using it.
Anyway i resolved it and if someone is interested i'll show how i've done it.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
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
|