
MS VisData Source Code falls off the rails, but the .exe works!?
Hello - i've been trying to get the example code project of MS VisData
to work, it only reads the first property of a chosen .mdb and the next
property in the colection is ' "" '. (the exe works fine)
i put in a check if the next property in the collection is "" to "exit for"
the sample code lists out tables & all other things, even properties, except
for the databases's properties out of the gate.
Function GetPropertyValue(prpObj As DAO.Property) As Variant
On Error Resume Next
Dim vTmp As Variant
vTmp = prpObj.Value '<--. . . . . . .this becomes invalid operation
If Err Then ' when i click on fields w/in a
Err.Clear ' table in its initial tree view
GetPropertyValue = "N/A" ' display.
Else
GetPropertyValue = vTmp
End If
End Function
HERE IS WHERE IT GETS ASSIGNED:
OneMoreTry:
If (frmMDI.dlgCMD1.Flags And FileOpenConstants.cdlOFNReadOnly) =
FileOpenConstants.cdlOFNReadOnly Then
gnReadOnly = True
Else
gnReadOnly = False
End If
'Set dbTemp = gwsMainWS.OpenDatabase(sDatabaseName, False, _
gnReadOnly, sConnect)
Dim x As Variant '<--.. . . . . here i check dbTemp's
x = dbTemp.Properties(1) ' properties & at the outset/
' out-of-the-gate, this next
' property is ""
Hoping for insight, Regards, Chris