Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


hover2gb wrote:
Try Tools>SQL...
ALTER TABLE "TableName" DROP COLUMN "Pics";
SHUTDOWN COMPACT;
Execute, close and reopen the database document.

If this does not help, You can extract the script file out of the
document archive, remove all references to that picture column and
rebuild the database from script.

OK.  I cannot even access the Tools/SQL menu without receiving the original
error.  So I extracted the script file and removed the "Image" references.
Then I can save the script file as whatever I want to call it.  But at this
point I do not know how to "rebuild the database from script" as you
mentioned above.

Can you describe the process?

Thanks,

CREATE CACHED TABLE "Table1"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, "Pictures" LONGVARBINARY, "Words" VARCHAR(100), "Slang" VARCHAR(75))

    After removing the image field, the SQL becomes:

CREATE CACHED TABLE "Table1"("ID" INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY, "Words" VARCHAR(100), "Slang" VARCHAR(75))

This is an example of the SQL for defining a table in the script file. The field containing the images is "Pictures", and its field type is LONGVARBINARY. Both of these should be removed from the SQL statement. Remember that this is a list separated by commas. You might need to remove a comma to maintain the list structure. If there is a right parenthesis following it, leave it in place. If you have used Archive Manager (file roller) to extract the script file, you can modify the script file without extracting the file. Hopefully you have already made a copy of the database file and are working with the copy rather than the original. Change the extension of the copy from .odb to .zip. Use Nautilus to browse to the location of the .zip file. Double click it to open file roller. Then double click the database folder in the file roller window. Double click the script file to open it in gedit. Remove the field and its field type and a comma if it follows "LONGVARBINARY". Save the file in gedit. When file roller pops up a window about updating the scrip file, click the Update button. You have now changed the database file. Rename the extension to .odb from .zip. Then open this database file to see if it is working properly.

--Dan

--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.