Hello List!
I have problem connecting a vector map to a database.
I created a vectormap by the v.digit command, and then I would like to add
some information to the digitialized points.
I created a db connection with this command:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.connect -o map=kietmelo_kutak_1
driver=dbf table=kutak1
WARNING: Table <kutak1> does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/>
WARNING: The table <kutak1> is now part of vector map <kietmelo_kutak_1>
and may be deleted or overwritten by GRASS modules.
Then I tried to add columns, but I got error message:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.addcol map=kietmelo_kutak_1 columns="nev
varchar(10)"
DBMI-DBF driver error:
Table 'kutak1' doesn't exist.
Error in db_execute_immediate()
ERROR: Error while executing: "ALTER TABLE kutak1 ADD COLUMN nev
varchar(10)
"
ERROR: Cannot continue (problem to add column).
What did I wrong?
Thanks for the help in advance,
Istvan
Hallo,
is file "kutak1.dbf" in your $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ ?
If no, where is it?
Jachym
On Tue, May 09, 2006 at 12:51:25PM +0200, Stefán István wrote:
Hello List!
I have problem connecting a vector map to a database.
I created a vectormap by the v.digit command, and then I would like to add
some information to the digitialized points.
I created a db connection with this command:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.connect -o map=kietmelo_kutak_1
driver=dbf table=kutak1
WARNING: Table <kutak1> does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/>
WARNING: The table <kutak1> is now part of vector map <kietmelo_kutak_1>
and may be deleted or overwritten by GRASS modules.
Then I tried to add columns, but I got error message:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.addcol map=kietmelo_kutak_1 columns="nev
varchar(10)"
DBMI-DBF driver error:
Table 'kutak1' doesn't exist.
Error in db_execute_immediate()
ERROR: Error while executing: "ALTER TABLE kutak1 ADD COLUMN nev
varchar(10)
"
ERROR: Cannot continue (problem to add column).
What did I wrong?
Thanks for the help in advance,
Istvan
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky@gdf-hannover.de
URL: http://gdf-hannover.de
Tel.: +49 511-39088507
did you run db.connct?
do you have the correct permission on the dbf file?
hello,
max
Stefán István wrote:
Hello List!
I have problem connecting a vector map to a database.
I created a vectormap by the v.digit command, and then I would like to add some information to the digitialized points.
I created a db connection with this command:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.connect -o map=kietmelo_kutak_1 driver=dbf table=kutak1
WARNING: Table <kutak1> does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/>
WARNING: The table <kutak1> is now part of vector map <kietmelo_kutak_1>
and may be deleted or overwritten by GRASS modules.
Then I tried to add columns, but I got error message:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.addcol map=kietmelo_kutak_1 columns="nev varchar(10)"
DBMI-DBF driver error:
Table 'kutak1' doesn't exist.
Error in db_execute_immediate()
ERROR: Error while executing: "ALTER TABLE kutak1 ADD COLUMN nev
varchar(10)
"
ERROR: Cannot continue (problem to add column).
What did I wrong?
Thanks for the help in advance,
Istvan
--
Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09
Yes it is....
I just usually use "db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'" to set the connection and then "v.db.connect -o map=blabla table=blabla" to set the link...
you can also do not use db.connect and specify connection parameters with v.db.connect.
In fact:
db.connect - Set up connection to the database through DBMI.
v.db.connect - Sets DB connection for a vector map.
The first command let you set the DB connection that GRASS is currently using, the second one set the link between the geometry file (native grass format) and an attribute file (db table).
If a DB connection is set (trough db.connect) it is used as default and no more additional parameters (driver & database) are needed.
Otherwise you have to specify the connection parameters: driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
Just try:
db.connect -p (to see your default connection setting)
db.tables -p (to see a list of the avilable tables)
just to check evrything is fine.... (you should be able to see you table!)
Hope it could be helpful...
Max
Stefán István wrote:
I ran v.db.connect. Isn't it the right command for a task like this?
Istvan
kedd 09 május 2006 17.39 dátummal ezt írta:
did you run db.connct?
do you have the correct permission on the dbf file?
hello,
max
Stefán István wrote:
Hello List!
I have problem connecting a vector map to a database.
I created a vectormap by the v.digit command, and then I would like to add some information to the digitialized points.
I created a db connection with this command:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.connect -o map=kietmelo_kutak_1 driver=dbf table=kutak1
WARNING: Table <kutak1> does not exist in database
<$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/>
WARNING: The table <kutak1> is now part of vector map <kietmelo_kutak_1>
and may be deleted or overwritten by GRASS modules.
Then I tried to add columns, but I got error message:
GRASS 6.1.cvs (Ferencvaros):~ > v.db.addcol map=kietmelo_kutak_1
columns="nev
varchar(10)"
DBMI-DBF driver error:
Table 'kutak1' doesn't exist.
Error in db_execute_immediate()
ERROR: Error while executing: "ALTER TABLE kutak1 ADD COLUMN nev
varchar(10)
"
ERROR: Cannot continue (problem to add column).
What did I wrong?
Thanks for the help in advance,
Istvan
--
Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09
--
Eng. Massimiliano Cannata
Scuola Universitaria Professionale della Svizzera Italiana
Istituto Scienze della Terra
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09
Massimiliano Cannata wrote:
Yes it is....
I just usually use "db.connect driver=dbf
database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'" to set the
connection and then "v.db.connect -o map=blabla table=blabla" to set
the link...
you can also do not use db.connect and specify connection parameters
with v.db.connect.
In fact:
db.connect - Set up connection to the database through DBMI.
v.db.connect - Sets DB connection for a vector map.
Hi,
I have modified the descriptions to be (hopefully) more precise:
db.connect help
Prints/sets general DB connection for current mapset
v.db.connect help
Prints/sets DB connection for a vector map to attribute table
Markus