Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing PL/SQL in Excel


Hi,
Anyone know if it is possible to execute Oracle PL/SQL code from within
Excel VBA code?
Thanks.


--
scos00
------------------------------------------------------------------------
scos00's Profile: http://www.excelforum.com/member.php...o&userid=28264
View this thread: http://www.excelforum.com/showthread...hreadid=491805

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Executing PL/SQL in Excel

Use ADO.
Create an ADO.Connection, connect to your Oracle database and use
Connection.Execute strPLSQL

Does your code return any records or values? Does it take any parameters?

Tim

--
Tim Williams
Palo Alto, CA


"scos00" wrote in
message ...

Hi,
Anyone know if it is possible to execute Oracle PL/SQL code from within
Excel VBA code?
Thanks.


--
scos00
------------------------------------------------------------------------
scos00's Profile:

http://www.excelforum.com/member.php...o&userid=28264
View this thread: http://www.excelforum.com/showthread...hreadid=491805



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing PL/SQL in Excel


So it is possible? That's great if I can get it working it will do
exactly what I want.

Yes I will need to pass 1 parameter to the stored procedure and then
capture a set of records later but this won't be in the return value.
What I want to do is pass the parameter to a procedure/function, then
the function will create records in a table. Then I want to read the
data from the table and drop it into a worksheet. I have used the ADO
connection before so I will try to dig out the syntax now....

Thanks!


--
scos00
------------------------------------------------------------------------
scos00's Profile: http://www.excelforum.com/member.php...o&userid=28264
View this thread: http://www.excelforum.com/showthread...hreadid=491805

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing PL/SQL in Excel


GREAT! Got it working with a simple procedure. Now I need to see if I
can get it working with a function - how do I capture the return
value??


--
scos00
------------------------------------------------------------------------
scos00's Profile: http://www.excelforum.com/member.php...o&userid=28264
View this thread: http://www.excelforum.com/showthread...hreadid=491805

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing PL/SQL in Excel


Right, I created a wrapper procedure to call the DB function so I don't
need to capture the return value (may add this later if someone can
help me out).

The only problem I have left now is that after executing the procedure
and fetching the data into the worksheet I lose focus from Excel
completely and have to manually select it from the Windows toolbar -
bizarre??! any ideas?

Thanks.


--
scos00
------------------------------------------------------------------------
scos00's Profile: http://www.excelforum.com/member.php...o&userid=28264
View this thread: http://www.excelforum.com/showthread...hreadid=491805

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing a bat file from Excel Mr BT[_2_] Excel Worksheet Functions 9 April 16th 07 09:18 PM
Executing of excel Macros. KarthikK Excel Discussion (Misc queries) 4 June 28th 05 12:00 PM
Executing sub procedure when Excel starts strataguru[_18_] Excel Programming 2 September 23rd 04 11:27 PM
Executing an older excel 4.0 macro pgerrish Excel Programming 0 April 22nd 04 05:41 PM
Excel VBA code executing a variable as a Sub. John Dempsey Excel Programming 3 October 3rd 03 10:34 AM


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"