Home » Infrastructure » Windows » Function Accessing Problem
Function Accessing Problem [message #367188] Wed, 08 November 2000 00:42
A.Radhakrishna
Messages: 1
Registered: November 2000
Junior Member
I have been using oracle stored procedures (oracle v7.3) for quite some time and I call them from VB (version 5.0) applications using RDO objects.

A peculiar problem has struck me and I am unable to solve it.

A simple function (code given below) which has been working for some time has suddely giving the error

'S1105 MicrosoftODBC drver for OracleInvalid parameter type'.

While there are certain other functions designed in the similar fashion are working. I am sure that the function is not modified. For my satisfaction, I have recompiled it but of no use. The said VB code is being called from a local network from different clients which is working since long time. Now all clients are reporting the same problem in accessing this function.

Any help or sugesstion is appreciated. Thanks in advance

Oracle Function Code is as follows

CREATE OR REPLACE FUNCTION GETPROJECTCODE(
PROJECTCODE IN RMA_MASTER.PROJECT_CODE%TYPE)
RETURN NUMBER IS
P1 RMA_MASTER.PROJECT_CODE%TYPE;
N number:=0;
CURSOR RMA IS SELECT PROJECT_CODE FROM RMA_MASTER WHERE PROJECT_CODE=PROJECTCODE;
BEGIN
OPEN RMA;
LOOP
FETCH RMA INTO P1;
EXIT WHEN RMA%NOTFOUND;
IF P1=PROJECTCODE THEN
N:=N+1;
END IF;
END LOOP;
CLOSE RMA;
RETURN N;
END GETPROJECTCODE;

VB Code for calling the function is as follows
(CN is rdo connection object which is initialised for global use in the program)

Public Function GetProjectCode(ProjCode As String) As Boolean
Dim S As String

S = "{ ? = call getprojectcode( ? )}"
Set Qy = CN.CreateQuery("", S)
Qy(0).Direction = rdParamReturnValue
Qy(1).Direction = rdParamInput
Qy(0).Type = rdTypeNUMERIC
Qy(1).Type = rdTypeVARCHAR
Qy(1).Value = ProjCode
Qy.Execute
While Qy.StillExecuting: Wend
GetProjectCode = IIf(Qy(0) > 0, True, False)
End Function
Previous Topic: Windows 98 personal 8i install problems.
Next Topic: ORA-12560:protocal adaptor error
Goto Forum:
  


Current Time: Thu Mar 28 13:59:11 CDT 2024