dynamically writeback into odbc connection

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • dynamically writeback into odbc connection

    Hi everyone,

    I want to build a small report to have users manage metadata for a parallel dimension within a Jedox-Web report.
    I've come as far as to dynamically generate the SQL-Statement and have the ODBCEXEC-Function shoot the values into the table via insert or update depending on user settings.

    My Problem: I want to install a button to ensure that inserting values is only executed once, but it seems that as soon as I have a macro, the ODBEXEC doesn't work properly.
    I have tried an if-condition with a cell as a trigger. a macro sets the cell to TRUE and back to FALSE. Inbetween a worksheet--calculate is executed.

    The macro does what it's supposed to, but no lines are inserted. If I run the steps manually, it works fine.

    Any ideas?

    kind regards
  • Hi keinelimitz,

    the PDO library is a quite spread throughout the web world, several cms use it. This is quite performant

    using ODBC with PDO is possible but it requires a special library (that is imho not included in the core environment)

    But you can define your connection params (connection string, user, password, db...) in an include file that you refer to in your macro

    hope this helps

    Post hoc, non est propter hoc
  • Hi laloune,

    thanks for the quick reply. I was not refering to an odbc connection, but to the mysql connections registered in jedox system manager > connections, assuming that jedox also uses the pdo internally. in that case I would not have to "work around" too much.

    Your hint is a good alternative, in my case I can just use the strings in the macro as users have no access to the file manager, but just report-manager.
  • When working with pdo in a Microsoft SQL-Server environment, I get the error message that the driver is not found with this command:

    PHP Source Code

    1. $db = new PDO('mssql:host=servername;dbname=Datenbankname','user','password');

    I tried the mysql-pdo instead and obviously the server being a mssql-server didn't respond, but it proved to me that php found the mysql driver. Where and how do I include the mssql-pdo?

    Kind regards