I have a stored procedure which has a table as one of its "out" parameters. I'm not able to call this procedure from c# .net. please let me know how i can access it. The procedure has been called from vb. I want to move the following code from vb to c#.
VB code
Function ReportTableRetr ieved(objReport Table As OraParamArray) As Boolean
Const constArraySize = 100
Dim i As Integer
Dim strSQL As String
Dim strMsg As String
Dim strReportDate As String
Dim strSysDate As String
strReportDate = RetrieveReportD ate
strSysDate = gstrSysDate
gdbSLAM.Paramet ers.Add "report_dt_ in", strReportDate, ORAPARM_INPUT
gdbSLAM.Paramet ers("report_dt_ in").serverTy pe = ORATYPE_DATE
gdbSLAM.Paramet ers.Add "sys_dt_in" , strSysDate, ORAPARM_INPUT
gdbSLAM.Paramet ers("sys_dt_in" ).serverType = ORATYPE_DATE
gdbSLAM.Paramet ers.Add "err_msg_ou t", "", ORAPARM_OUTPUT
gdbSLAM.Paramet ers("err_msg_ou t").serverTy pe = ORATYPE_VARCHAR 2
gdbSLAM.Paramet ers.AddTable "report_tab le", ORAPARM_OUTPUT, ORATYPE_VARCHAR 2, constArraySize, 255
strSQL = "Begin MRM.RUN_REPORT( :report_dt_in, "
strSQL = strSQL & " :sys_dt_in, "
strSQL = strSQL & " :report_table, "
strSQL = strSQL & " :err_msg_out); end;"
On Error Resume Next
gdbSLAM.Execute SQL (strSQL)
If Err.Number Then
MsgBox Err.Description , vbCritical
Else
Set objReportTable = gdbSLAM.Paramet ers("report_tab le")
ReportTableRetr ieved = True
End If
For i = 0 To gdbSLAM.Paramet ers.Count - 1
gdbSLAM.Paramet ers.Remove 0
Next
End Function
And the stored procedure in oracle
PROCEDURE RUN_REPORT
(
report_dt_in IN DATE,
sys_dt_in IN DATE,
report_table OUT RPT_LINE_OUT,
err_msg_out OUT VARCHAR2
)
IS
BEGIN
l_include_basis := FALSE;
report_dt := report_dt_in;
rl_idx := 0;
-- Determine whether to include data from current or history tables.
IF report_dt_in = sys_dt_in THEN
l_include_curre nt_data := 1;
ELSE
l_include_curre nt_data := 0;
END IF;
INIT_TABLE;
GET_GAPS;
GET_INVEST_DATA ;
GET_LOAN_BASIS;
GET_NOTIONAL_TO TALS;
FILL_TABLE;
report_table := rl_tab;
EXCEPTION
WHEN OTHERS THEN
IF l_sblock IS NULL THEN
l_sblock := 'MRM.RUN_REPORT ';
errMsg := 'Err info: ' || l_sblock || ': ' || SQLCODE || ': ' || SUBSTR(SQLERRM, 11,500);
errs.log('NONE' , l_sblock, SQLCODE, SUBSTR(SQLERRM, 11,500), l_usr, errMsg);
END IF;
err_msg_out := errMsg;
RAISE;
END RUN_REPORT;
0 1004 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: naimy |
last post by:
Hi,
I need to access more that 1 instance, is there a way to start a new
connection from a pl/sql script ?
eg.
inst1 has table I1
inst2 has table I2
I need to query I2 using columns from I1. It may sound unusual
etc.etc.
|
by: majk |
last post by:
hey!
Im looking for a db tutoral which covers accessing a Microsoft SQL database
on windows. I will be using VC++ if it matters. NO details just a basic
introduction!
Oracle DB access using C++ is also of interest!
Thanks!
|
by: Andrea M. Segovia |
last post by:
Hello,
I am a newbie to Oracle databases....
We have a visualization front-end tool connected to an Oracle back-end
database on a Tru64 UNIX server. We also have clients with MS access
databases who would like to share their data using this visualization
tool but do not want to import their data into the Oracle server
back-end.
|
by: Andrew Arace |
last post by:
I scoured the groups for some hands on code to perform the menial task
of exporting table data from an Access 2000 database to Oracle
database (in this case, it was oracle 8i but i'm assuming this will
work for 9i and even 10g )
No one had what I needed, so I wrote it myself.
I Rule.
This code isn't going for efficiency, and isn't trying to be dynamic.
It doesn't create the table structure in Oracle, that's up to you. (I
|
by: berj |
last post by:
How difficult is this? I'm having a tough time getting a simple select to
work.
I am using MS Access 2002 and Windows XP.
What do I have to do to make a simple select statement like this work:
select id from emp
| |
by: lovkeshanand |
last post by:
Dear All,
I am using the oracle transparent gateway connectivity with sql server
using tg4msql,as far as
settings are concerned those were set and Connectivity is working Fine,
and getting the response
from that server.
here is description what I done as:-There is a View on Sqlserver which
is Join of 6 tables and have
|
by: Mark D Powell |
last post by:
We are running SQL Server 2000 SP3. We have linked servers in use that
we use to access Oracle tables.
Recently the claim has been made that you can access Oracle tables from
within SQL Server without using a Linked Server. I searched Books
Online using keywords: linked, remote, and Oracle and did not find
anything.
A search of the newsgroup archives found only entries related to using
Linked Servers.
|
by: Mark Brown |
last post by:
I'm trying to access an Oracle database vb.net. I found several examples.
I tried following each one, but I get the same error no matter what I try.
I don't really understand what the error means (I've never tried accessing
an Oracle database before). The error I get is:
ORA-12514: TNS:listener does not currently know of service requested in
connect descriptor
I installed the oracle dll and added it as reference (I get the same error...
|
by: Bill |
last post by:
We have a corporate database that was upgraded to Oracle 10 and I can
no longer link to or query a table that contains a Time Stamp field
with Access 2003. I've tried the Microsoft ODBC driver and the Oracle
10 and Oracle 8 Driver.
Any ideas as to how to access this data?
|
by: Ken Williams |
last post by:
WhenI search Internet there thousands of comments and samples for database conenction and tuning.
They are all advanced and comprehesive.
I didn't found a simple "Hello World" for accessing an Oracle database.
This sample should contain just
- connecting to database,
- pass an SELECT FROM WHERE statement and
- read the result into a CSharp internal table/records.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |