Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6732313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:38:05+00:00 2026-05-26T10:38:05+00:00

I am using Visual Basic 6 to connect to Oracle 11g. Yes, I can

  • 0

I am using Visual Basic 6 to connect to Oracle 11g.
Yes, I can successfully connect to the database.
The problem is to receive the recordsets from the database.
I have created an oracle package like below:

Package:

CREATE OR REPLACE PACKAGE PKG_BASECODE AS

TYPE T_CURSOR IS REF CURSOR;

--// customer
PROCEDURE CustomerCode (
    I_CUST_CODE          IN VARCHAR2
    , I_CUST_NAME        IN VARCHAR2
    , customer_cursor    OUT T_CURSOR
);

END PKG_BASECODE;
/

Body:

CREATE OR REPLACE PACKAGE BODY PKG_BASECODE AS

--// customer
PROCEDURE CustomerCode (
    I_CUST_CODE          IN VARCHAR2
    , I_CUST_NAME        IN VARCHAR2
    , customer_cursor    OUT T_CURSOR
)
IS
    BEGIN
    OPEN customer_cursor FOR
    SELECT  CUST_CODE      AS KEYVALUE
            , CUST_NAME    AS DATAVALUE
    FROM    CUSTOMER_MASTER
    WHERE   CUST_CODE      LIKE I_CUST_CODE || '%'
    AND     CUST_NAME      LIKE I_CUST_NAME || '%'
    ORDER BY CUST_NAME ASC
    ;
    END CustomerCode;


END PKG_BASECODE;
/

It works great with C#.
I have already tested.

Now I have my Visual Basic 6 source codes below:

Dim rst As ADODB.Recordset
Dim cmd As ADODB.Command
Dim input1 As ADODB.Parameter
Dim input2 As ADODB.Parameter
Dim output1 As ADODB.Parameter
Set cmd = CreateObject("ADODB.Command")
With cmd
    .ActiveConnection = tmpDB_Total

    .CommandText = "PKG_BASECODE.CustomerCode"
    .CommandType = adCmdStoredProc

    .Parameters.Append .CreateParameter("I_CUST_CODE", adVarChar, adParamInput, 10, "")
    .Parameters.Append .CreateParameter("I_CUST_NAME", adVarChar, adParamInput, 50, "")
    .Parameters.Append .CreateParameter("CustomerCode", adVarChar, adParamReturnValue)
    Set rst = .Execute
End With

If Not rst.BOF And Not rst.EOF Then
    Do Until rst.EOF
        Debug.Print rst.Fields(1).Value & "," & rst.Fields(0).Value
        rst.MoveNext
    Loop
End If

And the connection source is below:

tmpDB_Total.Open "Provider=OraOLEDB.Oracle;" _
                 & "Password=mes123;" _
                 & "User ID=mes;" _
                 & "Persist Security Info=True;" _
                 & "Data Source=stmdev;"

And I receive an error something about parameters.
The error message is written in Korean language, so I cannot write straight away.
Please understand me.
Could anyone help me with this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:38:06+00:00Added an answer on May 26, 2026 at 10:38 am

    You’ve got an extra parameter in there. Just don’t try to append anything for that third parameter, and it should work. Note that you will need to set Cmd.Properties("PLSQLRSet") = TRUE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I connect to Facebook chat using C# or Visual Basic?
I'm using Visual Basic 2010 Express. I have a form that can be minimized.
I have an interesting problem. I'm using visual basic and before saving a row
I have some deprecated code in visual basic when connecting to an oracle database.
I'm using Visual Basic 2008 for example i have running notepad.exe , can i
I'm using Visual Basic 2008EE and I have a problem with this loop: If
I am using visual basic for coding. In my form I have a delete
I am using Visual Basic 6 I have the following code structure: FUNCNINFO is
I am using visual basic 6. I have a button created which when pressed
I'm quite new to Visual Basic - using Visual Studio 2008 and can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.