Giter VIP home page Giter VIP logo

Comments (5)

TatyanaI avatar TatyanaI commented on August 15, 2024

Hi
Thank you for call_procedure method, very useful.

We use it often but face a problem of calling procedures with output parameters type FLOAT.

Parameters for the call : ${parameters} = ['9932218011857', u'Deactive', u'NUMBER', u'NUMBER', u'call procedure from RIDE']

And got FAIL :
DatabaseError: ORA-06550: line 1, column 63:
PLS-00103: Encountered the symbol ";" when expecting one of the following:

) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ as between from overlaps using || multiset year
DAY_ member SUBMULTISET_
The symbol ")" was substituted for ";" to continue.

Doing call of procedure with same input parameters from PL/SQL Developer doesn't give any errors and works as expected.

Please recommend how to modify code to avoid such FAIL.

from robotframework-database-library.

zmlpjuran avatar zmlpjuran commented on August 15, 2024

Hi, Seems to me very complicated.

Try this:

import ast

    def call_procedure(self, name, parameters):
        '''
        call stored procedure with in and out parameters 
        @param name: name of procedure
        @param parameters: any set of parameters:
        - 25 # single parameter
        - [25, 'Text value'] # set of parameters
        '''
        cur = None
        try:
            cur = self._dbconnection.cursor()
            self.__callproc_sql(cur, name, parameters)
            allRows = cur.fetchall()
            self._dbconnection.commit()
            return allRows
        finally :
            if cur :
                self._dbconnection.rollback()

    def __callproc_sql(self, cur, procname, parameters):
        logger.debug("Executing : %s %s" % (procname, parameters))
        return cur.callproc(procname, ast.literal_eval(parameters))

from robotframework-database-library.

jerry57 avatar jerry57 commented on August 15, 2024

Call Stored Procedure keyword is not available in the master branch.

from robotframework-database-library.

edbrannin avatar edbrannin commented on August 15, 2024

@jerry57 Did you mean "now available"?

from robotframework-database-library.

jerry57 avatar jerry57 commented on August 15, 2024

yes, sorry about that typo :(

from robotframework-database-library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.