Opened 16 years ago
Closed 16 years ago
#381 closed defect (fixed)
wxgui: Show attribute data depends on global db connection, not file db connection parameter
Reported by: | mlennert | Owned by: | martinl |
---|---|---|---|
Priority: | major | Milestone: | 6.4.0 |
Component: | wxGUI | Version: | unspecified |
Keywords: | Cc: | grass-dev@… | |
CPU: | Unspecified | Platform: | Unspecified |
Description
When trying to access the attribute table in the wxgui, I get an error when the map is connected to a table which is not in the default database of the mapset, in other words v.db.connect gives other information for database than db.connect. This is because db.tables is called.
Probably attribute management of a single map and table management for the default database need to be decoupled somehow...
Change History (6)
follow-up: 2 comment:1 by , 16 years ago
follow-up: 3 comment:2 by , 16 years ago
Replying to martinl:
Seems to work for me...
db.connect -p driver:sqlite database:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db schema: group:v.db.connect bz -g 1 bz cat /home/martin/grassdata/nc_spm_08/sqlite/sqlite.db sqlite 2 bz1 cat /home/martin/grassdata/nc_spm_08/sqlite/sqlite.db sqlite 3 p cat grass_test pgNo problem to display attribute data of 'bz' vector map in wxGUI. 'db.tables' is called on line 2460 in 'dbm' module with 'driver' and 'database' parameters. So I don't see any problem. Please correct me.
IIUC, your map is connected to the database which is the default database of the mapset ($GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db - assuming that you are in location nc_spm_08 and mapset sqlite). The problem I saw was when the map was connected to a database (and driver) different from the default setting. I'll try to come up with a reproducible scenario, but that won't be before Monday.
Moritz
comment:3 by , 16 years ago
IIUC, your map is connected to the database which is the default database of the mapset ($GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db - assuming that you are in location nc_spm_08 and mapset sqlite). The problem I saw was when the map was connected to a database (and driver) different from the default setting. I'll try to come up with a reproducible scenario, but that won't be before Monday.
in my case, the third attribute table comes from PostgreSQL database.
comment:4 by , 16 years ago
Just checked again and the issue is actually that the db.connect parameters point to a non-existing database. That is why the db.tables call fails.
So, not sure if this is to be considered as a bug. On the other hand, it is an "inconvenience", if you have maps linked to different databases in your mapset and might be confusing, when the v.db.connect parameters work.
This is why I said: "Probably attribute management of a single map and table management for the default database need to be decoupled somehow..."
But maybe just a more explicit error message (e.g. "Please use db.connect to set database parameters"), might be helpful.
Leaving it open for now to keep it in mind, but if you want to close is as "worksforme" then that's fine with me.
Moritz
follow-up: 6 comment:5 by , 16 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Seems to work for me...
No problem to display attribute data of 'bz' vector map in wxGUI. 'db.tables' is called on line 2460 in 'dbm' module with 'driver' and 'database' parameters. So I don't see any problem. Please correct me.
?
Martin