Recordset .value property

后端 未结 1 1282
感情败类
感情败类 2020-11-28 16:35

Please see the DDL below:

CREATE TABLE TestDate (bookingdate datetime)
INSERT INTO TestDate VALUES (\'2013-10-04\')
<         


        
相关标签:
1条回答
  • 2020-11-28 17:29

    Value is the default property of the Field object, so in VB6 there is no difference between rs("bookingdate") and rs("bookingdate").value when used without Set.

    I personally prefer not using default properties that don't take parameters. It makes the code less confusing IMO.

    In VB.NET the default property must have a parameter, so this situation does not occur.
    Note Recordset has such default property with parameter, and you are using it to return the Field object: rs("bookingdate") is actually rs.Item("bookingdate"). Using those, IMO, makes no harm.

    0 讨论(0)
提交回复
热议问题