<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<blockquote type="cite"
cite="mid200406270501.AAA669853@itc01.baylor.edu"><br>
<pre wrap="">On Fri, Jun 25, 2004 at 06:01:53PM +0200, Radim Blazek wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Friday 25 June 2004 17:43, Daniel Isenegger wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi
i'm working on a suse 8.2 with grass57 (compiled from source) on a local
Grass-DB:
with:
db.connect -p
<a class="moz-txt-link-freetext" href="driver:dbf">driver:dbf</a>
<a class="moz-txt-link-freetext" href="database:/data/gis/nfp48/nfp48/ipodlas0.1/grass/grassdata/UpperEngadine/dis">database:/data/gis/nfp48/nfp48/ipodlas0.1/grass/grassdata/UpperEngadine/dis</a>
en/dbf
db.select-statement works well
(echo "select defoliatio from defoliation_53_shp" | db.select)
but db.execute statements fail, e.g.:
echo 'create table test_table ("cat" int, "desc" text)' | db.execute
</pre>
</blockquote>
<pre wrap="">'text' is not supported by DBF, column names should not be quoted, try
echo 'create table test_table (cat int, desc varchar(50))' | db.execute
</pre>
</blockquote>
<pre wrap=""><!---->
Also this suggestion fails (also the command given in the man page):
echo 'create table test_table (cat int, desc varchar(50))' | db.execute
DBMI-Postgres driver error:
Cannot execute:
create table test_table (cat int, desc varchar(50))
ERROR: parser: parse error at or near "desc" at character 35
WARNING: Error while executing: "create table test_table (cat int, desc
varchar(50))
"
(here: PG driver)
I don't know how to debug it...</pre>
</blockquote>
Hi<br>
hm, somehow strange:<br>
<font face="Courier New, Courier, monospace">create table
test_landcover (cat int, desc varchar(30)) </font><br>
works.<br>
<br>
but further operations fail, like (tried this with several variations
of quotations and escape-chars):<br>
<br>
<font face="Courier New, Courier, monospace">GRASS 5.7.cvs > echo
'insert into test_landcover values ('1', 'forest')' | db.execute<br>
DBMI-DBF driver error:<br>
SQL parser error in statement:<br>
insert into test_landcover values (1, forest)<br>
<br>
Error in db_execute_immediate()<br>
<br>
WARNING: Error while executing: "insert into test_landcover values (1,<br>
forest)<br>
"<br>
<br>
</font>or on a existing table:<font
face="Courier New, Courier, monospace"><br>
<br>
echo 'ALTER TABLE defoliation_53_shp ADD GRASSRGB varchar(30)' |
db.execute<br>
dbmi: Protocol error<br>
WARNING: Error while executing: "ALTER TABLE defoliation_53_shp ADD<br>
GRASSRGB varchar(30)<br>
"<br>
Broken pipe<br>
<br>
<br>
</font>
<blockquote type="cite"
cite="mid200406270501.AAA669853@itc01.baylor.edu">
<pre wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">also db.driver fails with the error:
error: can't read "opttype(1)": no such element in array
</pre>
</blockquote>
<pre wrap="">db.drivers -p ? Command line or GUI? </pre>
</blockquote>
</blockquote>
<blockquote type="cite"
cite="mid200406270501.AAA669853@itc01.baylor.edu">
<pre wrap=""><!---->
The GUI version gives that error.
Markus
</pre>
</blockquote>
exactly: on the GUI it fails. On the command line, this is fine.<br>
<font face="Courier New, Courier, monospace">db.drivers -p<br>
dbf<br>
shp<br>
odbc<br>
pg<br>
ogr<br>
</font> <br>
<br>
Dani<br>
<blockquote type="cite"
cite="mid200406270501.AAA669853@itc01.baylor.edu">
<pre wrap="">
</pre>
<br>
<hr width="90%" size="4"></blockquote>
<br>
</body>
</html>