Michael Reich wrote:
On 8/19/09 [email protected] wrote:
Subject:
Re: [users] Importing to Base
From:
Barbara Duprey <[email protected]>
Date:
Tue, 18 Aug 2009 22:02:55 -0500
To:
[email protected]
Michael Reich wrote:
On 8/18/09 7:12 PM, Andy wrote:
Michael Reich wrote:
On 8/18/09 [email protected] wrote:
This should self-correct once the above is working.
Hope this helps.
Thanks, Andy, but as I said, I originally had a date field key set
in the database, but when I deleted the key, I then got a
different error and even less records pasted (see the second error
message).
You mean that you do not have a backup of the database to work
from? And the data field was the unique field? I do not know Java
but it would see that the lack of that field is causing the problem
now.
Sorry I can not be of more help, maybe some of the database pros
will jump in.
I've got the original database in Windows and the exported CSV file
(which I pulled into Calc). When I deleted the key in the Base
file, I also deleted all the records from the Base file. I did not
delete the field, just the key. Then I tried pasting the copied
info again and got second error message. It makes no sense to me,
so maybe someone else will be able to shed some like on it.
Base really always needs some field defined as the primary key, and
it sounds as if you left the date field but not as the key, so Base
probably tried to establish an ID auto-increment field, right? Or did
you do something else about a key? Base is pretty bad about the error
handling, its messages (as you've found) are usually not particularly
helpful, but it does seem to be convinced that the existing date
field is supposed to contain unique values, and does not. Perhaps
you'd get someplace it you made a copy of your Calc file and sorted
on that field -- it might show one or more problems.
Your response was a helpful clue, Barbara. I went back and found
that even though I'd deleted the original key, which was a date field,
and created an additional field as key (just a number), the table
still thought the original key was in there somewhere. I created a
new table and identified the numeric field as the key. The pasting
operation from the Calc spreadsheet then mostly worked, although the
"Java" error mentioned in my original post still occurred. That seems
to be related to a relative handful of records not having field values
that the Base table was expecting. I've identified most of them and
can work around this issue.
So, it would appear that it's extremely important to create the
correct key field from the outset in Base. It does not seem to like
having key fields altered after the table is created.
One thing I can't figure out at this point is how to get that new key
field to auto-increment when adding a new record. The help files
talk about selecting an "auto increment" (or something like that)
property, but I can't find that anywhere. Sigh.
Glad it helped. One of the things that can be confusing is true nulls
vs. unset fields vs. spaces -- they can all look alike to us humans, but
these darn machines are really picky!
If you don't supply a key, Base will suggest that it create a field
called ID with the autoincrement property. Alternatively, you can
predefine the table to have a primary key field defined as an INTEGER,
with AutoValue set to Yes.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]