[GRASS-user] DBMI-DBF driver error

Matt mlpublic42 at gmail.com
Wed Jan 21 21:31:56 EST 2009


I'm still trying to understand why I can't get dbf related commds to
work in the Windows version running under Vista.  If I run the
database test from the GUI (Databases > Manage database > Test
database), I get reams of errors starting with:

     db.test test=test1

     create table grass_test1 (i1 integer, d1 double precision, c1 varchar(20))
     DBMI-DBF driver error:
     Cannot create dbf database: '$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'



     Unable to open database <'$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'>

     EXECUTE: ******** ERROR ********
     insert into grass_test1 values ( 1, 123.456, 'abcd' )
     DBMI-DBF driver error:
     Cannot create dbf database: '$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'



     Unable to open database <'$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'>

     EXECUTE: ******** ERROR ********
     insert into grass_test1 values ( 2, null, 'xxx' )
     DBMI-DBF driver error:
     Cannot create dbf database: '$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'

And so on.


Taking another approach, I tried using the GRASS plugins in QGIS.  In
QGIS I can display the roadsmajor map from the North Carolina dataset
(see details at beginning of this thread).  Using the QGis "Open
Table" icon I can open and move around the dbf file.  However, the
"Start editing" button is greyed out and does not work. So, the file
exists.  I'm running with administrator privileges.

Is anyone successfully working with dbf with Grass 6.3 under Vista?

On Mon, Jan 19, 2009 at 7:17 PM, Matt <mlpublic42 at gmail.com> wrote:
> You are correct.  'river.dbf' is a typo.  I did a cut and past, but
> the first character of the first line in the "Output - GIS.m" window
> always appears a couple of line up and to the right of the printer and
> "X" icons: it should have read "driver:dbf".
>
> The directory  'C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/dbf'
> does exist.
> This is probably grasping as straws, but could the difference between
> forward slash and back slash be important?  If I open a Windows
> Command Prompt window (a DOS window) and type
>     cd C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/dbf
> I go to the correct directory.  If I then type dir in the Command
> Prompt window, I see the directory listing.
> BUT  if I am back at the root directory (c:\) and type
>     dir C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/dbf
> I get an error message.  Repeating with the back slash gives the
> correct result in both cases.  For shorter examples "dir c:\" works,
> but "dir c:/" does not work (invalid switch).  Depending how GRASS and
> Windows interact, might this be a problem?
>
>
> On Mon, Jan 19, 2009 at 4:49 PM, Markus Neteler <neteler at osgeo.org> wrote:
>> Matt,
>>
>> On Sat, Jan 17, 2009 at 7:21 PM, Matt <mlpublic42 at gmail.com> wrote:
>>> I have a problem working through the DBF driver example on pp 174-175
>>> of Neteler & Mitasova with the North Carolina dataset.  I''m running
>>> version 6.3.0-4 under Windows Vista.  The first two commands execute
>>> without any obvious errors when run from the bottom window of "GIS.m".
>>>  But the third command has problems.
>>>
>>> db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
>>> db.connect -p
>>> g.copy vect=roadsmajor,myroadsmajor
>>>
>>> Output from db.connect -p is
>>>     river:dbf
>>
>> ("river" this is just a typo, no?)
>>
>>>     database:'$GISDBASE/$LOCATION_NAME/$MAPSET/dbf
>>>     schema:
>>>     group:
>>>
>>> Output from g.copy vect=roadsmajor,myroadsmajor is
>>>     g.copy vect=roadsmajor,myroadsmajor
>>>
>>>     Copy vector <roadsmajor at PERMANENT> to current mapset as <myroadsmajor>
>>>     DBMI-DBF driver error:
>>>     Cannot create dbf database:
>>> 'C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/dbf
>>
>> Does the directory exist?
>> If no, can you create it manually?
>>
>> Markus
>>
>>>     Cannot open database
>>> ''C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/dbf'
>>>     no database is open
>>>
>>>     Unable to copy table <myroadsmajor>
>>>
>>>     Cannot copy <roadsmajor at PERMANENT> to current mapset as <myroadsmajor>
>>>
>>> I've checked and the file
>>> 'C:/Users/Matt/Documents/GISdata/nc_spm_08/PERMANENT/roadsmajor.dbf'
>>> does indeed exist.  What am I doing wrong?
>>>
>>> Thanks in advance.
>>> Matt
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>>
>


More information about the grass-user mailing list