Linker IT Software
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Calling Oracle Stored Procedures (Read 2622 times)
Gerrit-Jan Linker
YaBB Administrator

Posts: 75
Calling Oracle Stored Procedures
23.09.11 at 10:18:56
Calling Oracle Stored Procedures
I tried to call a oracle procedure that exist in a package. SQL-XL always failed when I tried to do it. I tried to do it using two methods.

First method:
Call Application.Run("SQLXL.xla!SQLExecute", "Execute PACKAGE1.procedure1('MyString');")

Second method:
sqlxl.Sql.SetText Text:= "Execute PACKAGE1.procedure1('MyString');"

Both methods failed. Do you have any suggestion on how I can call a procedure in a package.

The second method should have worked. The semi colon is unnecessary and may confuse it.  
Is it sql server that you use?

Im using oracle.

Im creating a dummy package in oracle which is technically just do nothing.

I called this package using Toad/SQL plus. It works fine.

But when I called it using SQL-XL with the following method, it gave an exception.
sqlxl.Sql.SetText Text:= "Execute GATES.TEST.MyProcedure1('isenabled')"

Perhaps the problem is that it is not really Oracle syntax. Try:
setText Text:="begin gates.test.myprocedure1('isenabled'); end"
Back to top
« Last Edit: 23.09.11 at 10:25:19 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1