How to send data to Oracle DB from Engine

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to send data to Oracle DB from Engine

  • Creator
    Topic
  • #50643
    Damodar Seella
    Participant

      Hi, i have just started working on cloveleaf technology.

      I have a basic doubt, how

    Viewing 5 reply threads
    • Author
      Replies
      • #66943
        Rob Abbott
        Keymaster

          You will need our ODBC module (aka Data Integrator).  This gives you an ODBC API in Tcl that you can use to insert data directly into Oracle.

          Rob Abbott
          Cloverleaf Emeritus

        • #66944
          Damodar Seella
          Participant

            Hi Rob, Thank you for your reply.

            I do have Data Integrator. Can you give more info on Tcl and how can I insert data directly into oracle database.

            Do i need to write any queries ,if yes where?

            Thanks

          • #66945
            Jim Kosloskey
            Participant

              Damador,

              I am on vacation right now but if you email me I would be happy to share with you what we have for our Data Integrator and Oracle work we are currently doing and is also in the works once I return.

              [/code]

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #66946
              Lawrence Williams
              Participant

                I realize this is an older thread, but I was hoping to get some assistance with our new data integrator install.  I am ready to begin testing it and was hoping someone might offer some “hello world” type tcl odbc scripts that I could just put a database username/password into and follow along with what it does…..maybe just a simple “insert” or “query”.

              • #66947
                Jim Kosloskey
                Participant

                  Lawrence,

                  We use Data Integrator (with Oracle, SQL Server, and DB2) but we invoke Stored Procedures so the only Sql we have in our proc is that which is needed to setup the environment, bind the parameters, and invoke the stored procedure (we of course also have the Sql necessary for checking and handling errors).

                  We also do not define each DB in the odbc.ini file, instead we set the connection options at connect time using a ‘template’ definition in the odbc.ini file.

                  So what we do may not be a fit for you – if you would like to discuss what we do and how (and then maybe get the pr involved) feel free to email me.

                  email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

                • #66948

                  Here’s a couple of “Hello, World! scripts.

                  Code:

                  set usr sa
                  set pass
                  set dsn test_dev
                  package require odbc
                  echo [odbc SQLAllocHandle SQL_HANDLE_ENV SQL_NULL_HANDLE henv]
                  echo [odbc SQLSetEnvAttr $henv SQL_ATTR_ODBC_VERSION SQL_OV_ODBC3 0]
                  echo [odbc SQLAllocHandle SQL_HANDLE_DBC $henv hdbc]
                  echo [odbc SQLConnect $hdbc $dsn SQL_NTS $usr SQL_NTS $pass SQL_NTS]
                  echo [odbc SQLConnect $hdbc $dsn SQL_NTS $usr SQL_NTS $pass SQL_NTS]

                  package require odbc

                  set usr sa
                  set pass
                  set dsn test_dev

                  puts [odbc SQLAllocHandle SQL_HANDLE_ENV SQL_NULL_HANDLE henv]
                  puts [odbc SQLSetEnvAttr $henv SQL_ATTR_ODBC_VERSION SQL_OV_ODBC3 0]
                  puts [odbc SQLAllocHandle SQL_HANDLE_DBC $henv hdbc]

                  set retries 3
                  set sleep_int 5
                  set err [odbc SQLConnect $hdbc $dsn SQL_NTS $usr SQL_NTS $pass SQL_NTS]
                  while {$retries && [cequal $err SQL_ERROR]} {

                  [code]package require odbc

                  set usr sa
                  set pass
                  set dsn test_dev

                  puts [odbc SQLAllocHandle SQL_HANDLE_ENV SQL_NULL_HANDLE henv]
                  puts [odbc SQLSetEnvAttr $henv SQL_ATTR_ODBC_VERSION SQL_OV_ODBC3 0]
                  puts [odbc SQLAllocHandle SQL_HANDLE_DBC $henv hdbc]

                  set retries 3
                  set sleep_int 5
                  set err [odbc SQLConnect $hdbc $dsn SQL_NTS $usr SQL_NTS $pass SQL_NTS]
                  while {$retries && [cequal $err SQL_ERROR]} {

                  -- Max Drown (Infor)

              Viewing 5 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.