How to connect with MySQL database?

Bhavik Sheth_21143
Bhavik Sheth_21143 Altair Community Member
edited November 2023 in Community Q&A

Hello all,

I need guidance regarding Database connectivity.

I want to connect with SQL database and add one row in one specific table.

The table is already present in the database.

So how do I perform the connectivity with SQL and access table and add a row?

I really appreciate any help you can provide.

Best Answer

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    edited November 2023 Answer ✓

    Hello @Bhavik Sheth ,

     

    we decided not to provide any mechanism to modify a SQL database, as we the evaluated the possible risks were too high to allow such option. 

     

    Best Regards,

    Michael

Answers

  • Michael Herve_21439
    Michael Herve_21439
    Altair Employee
    edited November 2023 Answer ✓

    Hello @Bhavik Sheth ,

     

    we decided not to provide any mechanism to modify a SQL database, as we the evaluated the possible risks were too high to allow such option. 

     

    Best Regards,

    Michael

  • Bhavik Sheth_21143
    Bhavik Sheth_21143 Altair Community Member
    edited November 2023

    Hello @Michael Herve 

    Thank you for the information.

  • AndreasAltmann
    AndreasAltmann Altair Community Member
    edited November 2023

    Hello @Bhavik Sheth ,

    I had the same issue with SQLITE.
    Therefore I "installed" the sqlite3 package to the Altair TCL. 
    By installing I mean:
    - Install the package on a regular TCL installation. 
    - Copy the package folder to your Altair installation directory (... hwdesktop\hw\tcl\tcl8.5.9\win64\lib\tcllib1.13)
    - update the pkgIndex.tcl file with the information about the package

    Then it is possible to use the package within Altair (check in the tcl console: "package require sqlite3") and use regular TCL commands to interact with the database. 
    I'm quite sure it will work also with the "mysqltcl" package, which is required to work with a MYSQL database.

    BR

    Andreas