Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting the util object after a CONNECT statement

StuartHJul 29 2019 — edited Jul 30 2019

I'm starting up sqlcl using the /nolog switch

  • "C:\Program Files\SQL Developer\sqldeveloper\bin\sql.exe" /nolog

And then calling a .js script in the login.sql file that will manage the database connection using...

  • sqlcl.setStmt('CONNECT username/password@//host:port/sid');
  • sqlcl.run();

This is working fine, until I need to run a SQL using...

  • var ret = util.executeReturnList(sqlStr, null);

util is still set as null.  And will remain as such for until the current .js file finishes and I start a new one.

Is there any command to set the util from the current connection of the sqlcl object without leaving the current .js file?

Or is there an alternative method to connect to a database that won't have this drawback?

Comments

jariola

Hi,

Now in new version 2.0.5 release note, seems have info also about 2.0.4 version

Regards,
Jari

Madonna

Hi jariola,

Please have a look at the post below and let me know if you can help.

:Auto Generating Serial Number in Tabular Form

Thanks and regards,

Madonna

1 - 2

Post Details

Added on Jul 29 2019
15 comments
750 views