Kaydet (Commit) 84c02b6d authored tarafından Jean-Pierre Ledure's avatar Jean-Pierre Ledure

Access2Base - Fix OutputTo of null string

Basic builtin function IsDate
returns True for a null-length string.
Intercepted to avoid conversion to date giving "00:00:00"

Change-Id: Ie917574043ea743e43cd79c5d95d023c8ccab38a
üst e71ece6a
......@@ -1458,7 +1458,9 @@ Const cstMaxRows = 200
If Not vFieldsBin(i) Then
If bDataArray Then vDataCell = pvData(i, j) Else vDataCell = vData(i, j)
If vDataCell Is Nothing Then vDataCell = Null ' Necessary because Null object has not a VarType = vbNull
If IsDate(vDataCell) And VarType(vDataCell) = vbString Then vDataCell = CDate(vDataCell)
If VarType(vDataCell) = vbString Then ' Null string gives IsDate = True !
If Len(vDataCell) > 0 And IsDate(vDataCell) Then vDataCell = CDate(vDataCell)
End If
Select Case VarType(vDataCell)
Case vbEmpty, vbNull
vTdClass() = _AddArray(vTdClass, "null")
......@@ -1563,7 +1565,7 @@ Dim i As Integer, l As Long
lCurrentChar = 1
sOutput = ""
Do While lCurrentChar <= Len(psString)
' Where is next closest pattern ?
lPattern = Len(psString) + 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment