Placed my question in ActiveX board.
But no one is looking over there.
My question
Thanks for helping me out.
Printable View
Placed my question in ActiveX board.
But no one is looking over there.
My question
Thanks for helping me out.
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.
.
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 .Quote:
IsNull() is ridiculous
Found it.
Thanks to whom helped me.
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.Quote:
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 .
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. :)
.
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.