#33 closed defect (invalid)
About what 'DBOpen' and 'DBClose' functions should return
Reported by: | imendez | Owned by: | manuelb |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Math | Version: | head |
Severity: | normal | Keywords: | |
Cc: |
Description
'DBOpen' gives back:
- TRUE when you connect successfully with the data base,
- FALSE when data base connection can´t be established
Curiously, when the data base is already open, 'DBOpen' returns FALSE. My
question is what should return 'DBOpen' when this case befalls.
In my opinion, it should return TRUE, because the data base is open and FALSE
can be ambiguous.
Change History (4)
comment:1 Changed 21 years ago by
Owner: | changed from danirus to manuelb |
---|
comment:2 Changed 21 years ago by
Status: | new → assigned |
---|
comment:3 Changed 21 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
There are many functions under many languages that, for any reason, cannot
return "correctly" if an error or warning ocurred or, like this case, return an error
while it can be considered as a normal end of operation.
Opening an already opened database must return an error or, at least, a warning,
so that the TOL programmer is aware of the fact that the database was not opened
by the TOL code, and therefore should not be closed.
You can check if the database is already opened using DBSelect, a function to
handle multiple databases under TOL.
Regards.
comment:4 Changed 21 years ago by
Ups!!!
The function that selects an opened database in TOL is DBActivate, not DBSelect!
Sorry for the inconvenience!
I will take care of this, Dani.