[Libreoffice-bugs] [Bug 128607] Firebird database must be opened at all times in order to insert data using BASIC of Calc.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Nov 9 06:49:47 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=128607
--- Comment #7 from Nukool Chompuparn <nukool at gmail.com> ---
(In reply to Alex Thurgood from comment #5)
> @Nukool : thanks !
>
> You did register your ODB file with the LO application environment first
> didn't you ?
>
> If you read the macro code in the Calc file, it requires a database context
> to be correctly setup :
>
> rem Change this for your registered Base name
> Dim dbNAME As String : dbNAME = "REG_AA" ' 'Add Dim dbNAME As String
> : >>> REG_AA
> Db = Context.getByName(dbNAME)
>
> In other words, you are advised to register the database with the LO
> environment through
>
> Tools > Options > LibreOffice Base > Databases > New
>
> If you load REG_AAA into LO then the database context is automatically
> established, and running the macro will let you write to the database for as
> long the ODB file is in memory.
>
> However, if you just try running the macro without having registered the
> database with the LO environment so that it knows where to find (and load)
> the ODB file, then running the macro will fail.
>
>
>
> Note that if I register the ODB with the LO environment, when I try to run
> the Update_SQLOriginal macro, I get an error message:
>
> Erreur d'exécution BASIC.
> Une exception s'est produite :
> Type: com.sun.star.sdbc.SQLException
> Message: firebird_sdbc error:
> *conversion error from string "23/02/2019"
> caused by
> 'INSERT INTO "TABLE3" ("NAME", "Note") VALUES ('Input 104', '23/02/2019');'
> .
>
>
> I get this error irrespective of whether the ODB is file is loaded or not.
Yes, I have registered.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191109/682eedf6/attachment.html>
More information about the Libreoffice-bugs
mailing list