[GRASSLIST:5015] Re: Still having database trouble.

Michael Barton michael.barton at asu.edu
Wed Dec 1 11:12:12 EST 2004


Kurt,

Looking at what you have here, I think the problem is in the
directory/folder name Geographic.dbf. When dealing with  vector files and
databases in 5.7, all file and folder names must be SQL compliant. This
means that you can't use a "." in the path name because "." is reserved for
<table.field> designations. Rename the folder Geographic.dbf to
Geographic_dbf and I think all will work fine.

To answer Nick Cahill at the same time. v.db.connect works as easily as
ArcView's database connection routine. You need to

1) specify the vector you want to connect an attribute table to,

2) specify the data source location (i.e., the full pathname to  the folder
containing the table you want to link to [NB: a browse button that just
pulls up folders would be nice here and in some other places too]),

3) specify what kind of database you want to link to (drivers for dbf,
mysql, postgresql, odbc, and postgis are included),

4) give the name of the table (Note: when specifying the table name for a
*.dbf table, do NOT include the .dbf suffix.), and

5) specify the name of the key field (i.e., the field with values that match
the cat values in the vector file you  are linking to).


Filemaker DOES serve as an ODBC source in the Windows version. Apparently,
it still does not in the Mac version.

Michael

On 11/30/04 12:33 PM, "Kurt Springs" <ferret_bard at mac.com> wrote:

> Hi Folks,
> 
> Update.  I still can not connect to my database, even if it is converted
> to a .dbf.  I started with db.connect set to dbf and the data base name
> with string.  It seemed to work fine.  I used v.database.  It also
> seemed to work fine.  Then I ran  v.in.db, and this is the message I got:
> 
> v.in.db driver=dbf database=/Users/Documents/grass_stuff/Geographic.dbf
> table= 
> /Users/Documents/grass_stuff/Geographic.dbf/Wedge_Tomb_Geographic_Data
> x=Easting y=Northing key=Catalogue_Number output=Wedge_Tomb
> Sorry 
> </Users/Documents/grass_stuff/Geographic.dbf/Wedge_Tomb_Geographic_Data>
> is not a valid option
> 
> 
> 
> Now the table name is what I used in FileMaker.  When I converted, I
> just took over the catalogue number, easting, and northing.  Table is a
> required field, but I wasn't sure what I should use, or perhaps I did
> not format it right.
> 
> On another note, I still can't convert my old GRASS 5.3/5.4 site files
> into point vector format.  This is what I get:
> 
> GRASS 5.7.0:~ > v.in.sites input=wedge_tombs output=wedge_tombs
> Input format: dimension: 2   strings: 1   FP:1
> DBMI-DBF driver error:
> Cannot open dbf database: /Users/Documents/grass_stuff/Geographic.dbf
> 
> Like it is still try to connect to a data base rather than the site_list
> file.  Any thoughts on correcting this?
> 
> Kurt

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton




More information about the grass-user mailing list