-
Sql and VB
[Originally posted by kev]
Hello to all,
Here is what my return recordset looks like from
a store procedure.
How do you check for empty string when it return
NULL.˙ Or how do you test for empty string.
It very confusing.
DateDue˙ ˙ PO#˙ ˙ ShippedDate
===============================
1/2/2003˙ 123˙ ˙ ˙ ˙ 2/3/2003
Null˙ ˙ ˙ 345˙ ˙ ˙ ˙ 3/4/2003
1/3/2003˙ Null˙ ˙ ˙ Null
Now, in VB I want to check if the string is empty.
Example
if len(trim(DateDue)isNull then
˙ msgbox "Date Due is empty
else
˙ msgbox "Date Due is not empty
endif
Anyone can help
thanks˙ ˙
-
Re:Sql and VB
[Originally posted by Zip]
If (IIF(isNULL(DateField,'',DateField)="") then
msgbox "DateField Required"
Else
msgbox "DateField Populated with " & DateField
End if
hope this helps
-
Re:Re:Sql and VB
[Originally posted by Chris Carta]
If I remeber...
Dim dtFld As String
dtFld = DateField & ""
Will remove a trailing null, and produce an empty string ("") if it is null...but I could be mistaken.
Chris
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|