Página 1 de 1

How come tDbfDataSet:Open, doesn't actually open anything?

Publicado: Mié Jul 18, 2012 3:15 pm
por Guest
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.

How come tDbfDataSet:Open, doesn't actually open anything?

Publicado: Mié Jul 18, 2012 8:25 pm
por Guest
I think this is just another case of requiring these very useful classes - because they are components - to be called as part of a form.