Rick_S
asked on
Testing to see if there is nothing in String?
I'm trying to copy a string out of a string field and into a TMemo This is what i'm using:
Memo1.Text := F_MainMenu.TB_Output['Comm ent']
but if the Comment field does not have a string in it then the system gives me a EVariant Error 'Invalid Variant Conversion' I tried testing like this:
if not (F_MainMenu.TB_Output['Com ment'] = '') then
Memo1.Text := F_MainMenu.TB_Output['Comm ent'];
but it does not help. Thanks for your time....
Rick S.
Memo1.Text := F_MainMenu.TB_Output['Comm
but if the Comment field does not have a string in it then the system gives me a EVariant Error 'Invalid Variant Conversion' I tried testing like this:
if not (F_MainMenu.TB_Output['Com
Memo1.Text := F_MainMenu.TB_Output['Comm
but it does not help. Thanks for your time....
Rick S.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, null is a special constant, of type variant. Here is the complete code :
if not (F_MainMenu.TB_Output['Com ment'] = null) then
Memo1.Text := F_MainMenu.TB_Output['Comm ent'];
if not (F_MainMenu.TB_Output['Com
Memo1.Text := F_MainMenu.TB_Output['Comm
ASKER
Thanks for your time and quick response. That Worked great I gave you an extra 10 points for the example... also, did you see my other question it's worth 350 and nobody has touched it. Thanks again...
Rick S.
Rick S.
ASKER
Sorry ygolan I tried to up the point value and it does not look like it worked if you would like I'll post a 10 point question and let you answer it and give you the points let me know thanks...
Rick S.
Rick S.
Rick,
That's ok, don't worry about it.
Let me know what is the title of your other question, and I'll take a look at it.
That's ok, don't worry about it.
Let me know what is the title of your other question, and I'll take a look at it.
ASKER
Thanks again.....
The title of the other question is:
"SetScrollInfo and ScrollInfo"
The date was 7/31
Part of the second part of my question is also asked by PhiNet on 7/25 in the question 'Scrollbar In DBGrid ( Delphi 3 )' that has not yet been answered. If you can answer my question then you'll also be able to pick up the credit for the 100 point question of his.
The title of the other question is:
"SetScrollInfo and ScrollInfo"
The date was 7/31
Part of the second part of my question is also asked by PhiNet on 7/25 in the question 'Scrollbar In DBGrid ( Delphi 3 )' that has not yet been answered. If you can answer my question then you'll also be able to pick up the credit for the 100 point question of his.
ASKER