how to use executereader() with oralce?
-
hi, In my appication i'm using Oracle as a back end. In that when i'm using ExecuteReader() it shows an exception. Can any one of help me to solve this issue.
oleDBConnection = new OleDbConnection(connectString); string query = "SELECT V_FIRST_NAME,V_LAST_NAME,V_PHONE_NUMBER,V_EMAIL,V_FAX_NUMBER,V_ADDRESS,V_TITLE,V_POSTAL_CODE,V_COUNTRY from UserDetails where (V_USER_ID = ?) AND (V_PASSWORD = ?)"; OleDbCommand oledbCmd = new OleDbCommand(query, oleDBConnection); oledbCmd.CommandText = query; oledbCmd.CommandType = CommandType.Text; OleDbParameter par = oledbCmd.Parameters.Add("UserName", OleDbType.VarWChar, 50); OleDbParameter parm = oledbCmd.Parameters.Add("password", OleDbType.VarWChar, 50); oledbCmd.Parameters["UserName"].Value = userName; oledbCmd.Parameters["password"].Value = password; oledbCmd.Connection = oleDBConnection; oleDBConnection.Open(); OleDbDataReader dr ; dr = oledbCmd.ExecuteReader();
It threw an exception when executing the last line. The exception states that Unspecified error.Oracle error occured,but error message could not retrieved from Oracle.Data Type is not supported.