VB6 equivalent of string.IsNullOrEmpty

后端 未结 7 1404
野趣味
野趣味 2020-12-29 20:40

I\'m doing some work on a legacy application, and my VB6 skills aren\'t that great. I need to check whether a String field has been initialized and set to something other th

7条回答
  •  [愿得一人]
    2020-12-29 21:16

    Just adding info to MarkJ's answer. If you are working with a recordset, this

    if rs.fields.item("rsField").value = "" then
    

    Will throw a runtime error in case that item is null. You should do this:

    if rs.fields.item("rsField").value & "" = "" then
    

    Good luck.

提交回复
热议问题