Comments (5)
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.
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.
Call Stored Procedure keyword is not available in the master branch.
from robotframework-database-library.
@jerry57 Did you mean "now available"?
from robotframework-database-library.
yes, sorry about that typo :(
from robotframework-database-library.
Related Issues (20)
- Keyword "table must exist" fails with DB's which don't support information_schema
- Improve error messages in assertion keywords
- Recover docs from original Franz-see project
- v.1.30 - connection issue using MS SQL + pyodbc + SQL Driver HOT 1
- [feature] enhance Execute script KW to support more statement blocks HOT 6
- New Oracledb driver - support switching to thick mode and back to thin mode HOT 3
- Extend compare methods with pandas support HOT 2
- Self managed connections HOT 5
- Use Python convention naming
- [New client] Impala client
- [New client] Databricks client
- Handling multiple database connections HOT 5
- Query result list contains pyodbc.Row instead of python tuples HOT 4
- ProgrammingError: Unsupported parameter (Support for dict only): [] HOT 6
- Execute Sql String error with characters % HOT 6
- Parse SQL script files using external lib
- Single "Row Count" keyword with Assertion Engine HOT 1
- Smart wait for "check if exists" / "row count" assertion keywords
- Query params don't work for MS SQL (pymssql) HOT 1
- Call stored procedure does not work with pymssql driver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robotframework-database-library.