Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while executing Store procedure #249

Open
jainmnsh opened this issue Jan 27, 2015 · 1 comment
Open

Error while executing Store procedure #249

jainmnsh opened this issue Jan 27, 2015 · 1 comment

Comments

@jainmnsh
Copy link

Hi Guys,

I am able open the connection and able to execute the sql fine but when I am trying to execute the procedure, its just returning very generic message. any help will be appreciate..

Error: ORA-00900: invalid SQL statement

below is my code.
sql = "EXECUTE xxxxx ( '2022', :1 );";
// callback(null, 'Success');
oracle.connect(connString, function (err, connection) {
if (err) {
logger.error('connection Error ' + err);
callback(err, null);
}
else {
logger.debug('connection success');
connection.execute(sql, [new oracle.OutParam(oracle.OCCICURSOR)], function (err, results) {
if (err) {
logger.error('Error in execution of SP' + err);
connection.close();
}
else {
connection.close();
logger.debug('Results ' + JSON.stringify(results));
callback(null, results);
}

        });
    }

});
@cjbj
Copy link

cjbj commented Jan 27, 2015

EXECUTE is a SQL*Plus client command. It's not part of SQL or PL/SQL. Try using a BEGIN END block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants