Home » SQL & PL/SQL » SQL & PL/SQL » getting ???? as output value from stored procedure.
getting ???? as output value from stored procedure. [message #38268] Fri, 05 April 2002 09:08 Go to next message
rizzu
Messages: 1
Registered: April 2002
Junior Member
I am usind ADO to connect and execute stored procedure.
it is accepting two in parameter and 10 output parameters.
why i am getting ???? marked in all the output parameter.i do have some meaningful data in database.
but i am not able to know ,why ???? is coming as value.
i need urgent help about this problem...
please help me out.
Re: getting ???? as output value from stored procedure. [message #38275 is a reply to message #38268] Sat, 06 April 2002 04:57 Go to previous message
Bhagwan Singh
Messages: 23
Registered: December 2001
Junior Member
Hi Rizzu,
iam sending u a small 'ok' button example which uses scott/tiger example.seems u r missing something.will have to see ur VB code, but just try out this.this is having 2 input and 1 output parameter.It takes Empno and his deptno from emp table and returns his name.

if u get some output then u shouldn't have any problem in putting as many input as well as output as long as u have defined the create parameter.well..check this code.

Private Sub cmdOK_Click()
connString = "Provider=OraOLEDB.Oracle;data source=<>;user id=<>;password=<>;PLSQLRSet=1;persist security info=false"
Set objConn = New ADODB.Connection
Set CPw = New ADODB.Command
Set Rs = New ADODB.Recordset
objConn.Open connString
With CPw
.ActiveConnection = objConn
.CommandText = "Show_EmpName"
.CommandType = adCmdStoredProc
End With

Set param_in1 = CPw.CreateParameter("Empno", adInteger, adParamInput, 4, TxtUser.Text)
Set param_in2 = CPw.CreateParameter("Deptno", adInteger, adParamInput, 2, TxtNewPassword.Text)
Set param_out = CPw.CreateParameter("EmpName", adVarChar, adParamOutput)
CPw.Parameters.Append param_in1
CPw.Parameters.Append param_in2
CPw.Parameters.Append param_out
CPw.Execute
Msgbox param_out
objConn.Close
End Sub
Cheers
Bhaggs
Previous Topic: getting error oracle8.1.6
Next Topic: debugging stored procedure
Goto Forum:
  


Current Time: Fri May 03 22:49:21 CDT 2024