<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Firebird database must be opened at all times in order to insert data using BASIC of Calc."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=128607#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Firebird database must be opened at all times in order to insert data using BASIC of Calc."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=128607">bug 128607</a>
              from <span class="vcard"><a class="email" href="mailto:iplaw67@tuta.io" title="Alex Thurgood <iplaw67@tuta.io>"> <span class="fn">Alex Thurgood</span></a>
</span></b>
        <pre>@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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>