Page 1 of 1

[Solved] Unable to delete records

PostPosted: Sun Oct 20, 2019 4:52 pm
by spursystarman
Hi,
I have a text file that I created a link to using "connect to existing database" and checked "text". The text file in question has fields delimited by | but I have several problems. For one thing there do not appear to be any field names. Usually these names would be automatically generated as 'field1' etc (at least that's what access does)
Most of the buttons are greyed out in table data view and I am unable to delete records from there. From googling, this appears to be because there is no primary field, but how can I set a field to be primary if there are no field names? I can't 'select all' (in order to import into excel for example) as this option isn't even available.
the DB contains over 25000 records and about 20 fields. The first record is highlighted.

Is there any other way of creating a usable DB from this text file? (the actual file termination is .dat but it is a text file)

Re: unable to delete records

PostPosted: Sun Oct 20, 2019 6:28 pm
by F3K Total
  • rename your Textfile, having the extension .csv
  • import it to calc, using the "pipe" as delimiter
  • insert one extra toprow
  • type in now empty cell A1 "Field1"
  • drag that cell to the right until the last column is reached, should then be "Field20"
  • save the file as DBASE (.dbf) in an extra folder.
  • Create a new .odb database file, Menue File/New/Database check "Connect to an existing database"
  • select dBASE, Next >>
  • Browse "Path to dBASE files"
  • Select the extra folder, Next >>
  • Decide if you want to register the database, Finish
  • Type in the name for the .odb file and save it

Re: Unable to delete records

PostPosted: Sun Oct 27, 2019 7:12 pm
by spursystarman
Many thanks for that, I will give it a try! Incidentally, what does 'register the database' do? Or mean?

Re: Unable to delete records

PostPosted: Sun Oct 27, 2019 7:20 pm
by F3K Total
If you insert your DB to
Menue Tools/Options.../OpenOffice Base/Databases
Then OpenOffice can use the DB-Data within Writer or Calc by pressing F4, you can see the data and import them.
Means, your OpenOffice Installation only on your computer knows about the location of the registered database(s).

Re: Unable to delete records

PostPosted: Sun Oct 27, 2019 9:12 pm
by spursystarman
Ah, OK. Thanks. I always wondered what it meant!