Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Excel to call Oracle Stored procedure.

I am trying to get Excel/MSQuery to call an Oracle stored procedure and
return a record set. Every time I try it I get an access violation error. Is
there a way to call an Oracle stored procedure (or function) and return a
record set to excel?
Thanks.
--
Thanks for the Memory.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Using Excel to call Oracle Stored procedure.


in vba i use the following to read from SQL server
change the provider "MSDASQL" to whatever is appropriate for Oracle
also change servername, databasename ans stored_proc_name appropriately

Dim rst As ADODB.Recordset
Dim db As Connection
Dim SQL As String
Dim i As Long
Set db = New Connection

With db
.CursorLocation = adUseClient
.Open "PROVIDER=MSDASQL;driver={SQL
Server};server=SERVERNAME=;pwd=;database=DATABASEN AME;"
End With

Set rst = New Recordset
SQL = "STORED_PROC_NAME"
rst.Open SQL, db, adOpenStatic, adLockOptimistic

range("B5").CopyFromRecordset rst




"pdcjlw1" wrote in message
...
I am trying to get Excel/MSQuery to call an Oracle stored procedure and
return a record set. Every time I try it I get an access violation error.
Is
there a way to call an Oracle stored procedure (or function) and return a
record set to excel?
Thanks.
--
Thanks for the Memory.


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
Best way to call a SQL Server Stored Procedure from within Excel SQLScott Excel Programming 2 October 29th 08 06:00 PM
How can Oracle DB Stored procedure be called in MS Excel? Amol Excel Discussion (Misc queries) 1 January 7th 07 10:05 AM
Calling Oracle Stored Procedure Jim Heavey Excel Programming 3 February 10th 06 01:24 AM
Returning a resultset from Oracle Stored Procedure using ADO (VBA) mary Excel Programming 0 December 30th 05 05:26 PM
Call Oracle Procedure from Excel macro test[_8_] Excel Programming 3 June 7th 05 01:18 AM


All times are GMT +1. The time now is 08:55 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"