[GRASS5] db.execute

grass at forreststevens.com grass at forreststevens.com
Thu Jan 27 11:22:49 EST 2005


Because the id field is an integer it doesn't require single quotes:

echo "INSERT INTO laender ( id, cat ) VALUES(86, 'YY')"|db.execute


Yours,
Forrest R. Stevens

-----Original Message-----
From: grass5-admin at grass.itc.it [mailto:grass5-admin at grass.itc.it] On
Behalf Of Stephan Holl
Sent: Thursday, January 27, 2005 9:11 AM
To: grass5 at grass.itc.it
Subject: [GRASS5] db.execute


Dear List,

I have problems to insert new rows in a newly created attribute-table.
my given command:

echo "INSERT INTO laender ( id, cat ) VALUES('86', 'YY')"|db.execute
DBMI-DBF driver error:
Incompatible value type.
Error in db_execute_immediate()

ERROR: Error while executing: "INSERT INTO laender ( id, cat )
VALUES('86',       'YY')
       "
But I  have no success, the dbf-attribute-table stays empty.

The table:
db.describe laender
table:laender
description:
insert:yes
delete:yes
ncols:2

column:id
description:
type:INTEGER
len:11
scale:0
precision:10
default:0
nullok:yes
select:yes
update:yes

column:cat
description:
type:CHARACTER
len:59
scale:0
precision:0
default:
nullok:yes
select:yes
update:yes

Can anybody give me a hint to solve this problem, please?

Thanks in advance

Cheers
	Stephan

-- 
Stephan Holl

Check headers for GnuPG Key!
http://www.gdf-hannover.de





More information about the grass-dev mailing list