How come tDbfDataSet:Open, doesn't actually open anything?
Publicado: Mié Jul 18, 2012 3:15 pm
When a tDbfDataSet is created, points to a valid dbf, and is Opened, how come Open() doesn't actually open the file for reading or writing?
The Open Method which includes the statements
IF ! ::lCreated
::FlOpen := .T.
RETURN .T.
ENDIF
near the top of the source, and since ::lCreated is true, it sets ::FlOpen to true, then returns. But it doesn't actually open the table, and therefore none of the data access methods will work.
It never actually gets to the
DbUseArea( ::lNew, ::oDataSource:cDriver, ::oFileName:cFileName, ::cAlias, ::lShared, ::lReadonly )
statement.
The Open Method which includes the statements
IF ! ::lCreated
::FlOpen := .T.
RETURN .T.
ENDIF
near the top of the source, and since ::lCreated is true, it sets ::FlOpen to true, then returns. But it doesn't actually open the table, and therefore none of the data access methods will work.
It never actually gets to the
DbUseArea( ::lNew, ::oDataSource:cDriver, ::oFileName:cFileName, ::cAlias, ::lShared, ::lReadonly )
statement.