Hi there,
I'm having a strange problem whereby I can execute a select query in Oracle SQL Developer that rerturns some rows but, when this same query is placed into C#, I get no results.
I've debugged the code and the date that I am passing in in the site is indeed being passed through to the query, but no rows are being returned.
Please can you help me understand what code in my statement is causing the problem as similar queries in my C# class are returning rows.
Thanks
Matt
Oracle Statement:
C# Class method with statement:
I'm having a strange problem whereby I can execute a select query in Oracle SQL Developer that rerturns some rows but, when this same query is placed into C#, I get no results.
I've debugged the code and the date that I am passing in in the site is indeed being passed through to the query, but no rows are being returned.
Please can you help me understand what code in my statement is causing the problem as similar queries in my C# class are returning rows.
Thanks
Matt
Oracle Statement:
Code:
SELECT corporateactionnumber, sedolnumber, isincode, stockname, corporateactiontype, receiveddate, admincode, signedoff
FROM tblcorporateactions
WHERE receiveddate = to_date('23-Jan-08', 'DD-MON-YY')
Code:
string queryString = string.Format(@"SELECT corporateactionnumber, sedolnumber, isincode,
stockname, corporateactiontype, receiveddate, admincode, signedoff
FROM tblcorporateactions
WHERE receiveddate = to_date({0}, 'DD-MON-YY')", date);
Comment