473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,320 developers and data experts.

Executing Oracle Stored Procedures with IN OUT type parameter.

debasisdas
8,127 Expert 4TB
Oracle Procedure with IN OUT type as parameter mode.
========================================
Expand|Select|Wrap|Line Numbers
  1. create or replace procedure inout(num in out number)
  2. as
  3. begin
  4. select (sal+nvl(comm,0))*12  into num from emp where empno=num;
  5. end;
To call the above Oracle procedure from Vb.
================================
Expand|Select|Wrap|Line Numbers
  1. 'general declaration
  2. Dim CON As New ADODB.Connection
  3. Dim PR As New ADODB.Parameter
  4. Dim PR1 As New ADODB.Parameter
  5.  
  6. Private Sub Command1_Click()
  7. CON.Open "Provider=MSDAORA.1;Password=DEBASIS;User ID=DEBASIS;Data Source=DAS;Persist Security Info=True"
  8. Dim CMD As New ADODB.Command
  9. CMD.ActiveConnection = CON
  10. CMD.CommandType = adCmdStoredProc
  11. CMD.CommandText = "inout"
  12. Set PR = CMD.CreateParameter("num", adNumeric, adParamInputOutput, 4, Int(DC1.Text))
  13. CMD.Parameters.Append PR
  14. CMD.Execute
  15. If Not IsNull(CMD.Parameters("num").Value) Then
  16. Text1.Text = CMD.Parameters("num").Value
  17. Else
  18. Text1.Text = ""
  19. MsgBox "Data Is Not Available"
  20. End If
  21. CMD.Cancel
  22. CON.Close
  23. End Sub
Sep 8 '07 #1
0 7898

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mohammad | last post by:
hi when i try to send a blob or Longraw value with more than 32k as parameter to stored procedure in oracle 9i, the following exception raise "ORA-01460 : Unimplemented or Unreasonable...
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
3
by: IGotYourDotNet | last post by:
Can anyone point me to some example ASP.NET apps that use Oracle has a backend and C# as the language? I need to figure out how to populate a drop down, and then a datagrid depending on what the...
4
by: Stuart Ferguson | last post by:
I am currently writing code to execute SQL Server 2000 Stored procedured using the ODBC.NET SQL Server Driver. The particular stored procedure I am using has multiple paramaters which I have...
1
by: A1 Ronen | last post by:
Hi all I got problem regarding executing all stored procedure through common procedures where we have different parameter with different names, type and data type The Function is as follows...
0
by: george | last post by:
Hi world! Anyone experienced building gridview in Oracle environment using stored procedures, please help! Right now, I have issues using Oracle SP, I spent a whole day on this and still...
14
by: jehugaleahsa | last post by:
Hello: I am working with Oracle .NET Stored Procedures. I would like to know how to return the results of a SELECT statement. I have tried returning a OracleRefCursor and a DataTable, but...
0
debasisdas
by: debasisdas | last post by:
This thread contains some of the sample code showing the method of executing Oracle stored procedures and functions from VB . Hope the user finds them useful. Oracle Procedure with only IN...
4
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.