I am running a query under oledb dataprovider in VS2010 vb the quer throws a ora-06512 error on a function call.
The same SQL statement runs in TOAD, SQL Developer and even VB6.
Any ideas would be appreciated.
The function is called within a case statement
eg. (case when renewaldate is not null then getrenewalmonth(companynumber) else null end)
getrenewalmonth does a select of the renewal date or or another date and returns the relevant month.
eg select renewaldate,startdate into renewaldt,startdt from company where conum = companynumber; if startdt is not null then return to_number(to_char(startdt,'MM')) else return to_number(to_char(renewaldt,'MM')) else return null;
Regards
Mark