Quantcast
Channel: Off-Topic Posts (Do Not Post Here) forum
Viewing all articles
Browse latest Browse all 14169

Oracle SQL Statement runs in Toad,SQL Developer and VB6 but not under oledb in VB.NET

$
0
0

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


Viewing all articles
Browse latest Browse all 14169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>