I am trying to create an application with ODBC compliant code for DB business logic is in c# DBs to use are oracle 12c and 11g and MSSQL
I am using ADO.NET, OLEDB, ODP.NET , ODBC etc.
Problem is when i try to use the ODBC code with oracle 12C where i am getting cast errors and other errors,I have tried IDbConeection, IDbCommand etc but they have a problem in case of Oracle (Ref Cursor) and data types of different databases and also there is problem with the DBTypes because they are enum define differently with different data providers.
for example, for boolean, the links below show i can use SQL_BIT as ODBC type but it's not even showing up in the intellisense
As far as I can tell, Oracle doesn't have booleans.
First converting a field to string and then parsing it doesn't really make sense. Parsing also expects the parsed string to be in the correct format for the expected data type, so if you parse "1" it won't lead to the boolean value true.
Instead of converting the value from the database to string, see if you can use Convert.ToBoolean() instead.