简体   繁体   中英

How to insert data in oracle table from c#

Im trying Oracle Table insert from c#, but see below error message.

Please help me, Thanks.

catch (OracleException oraex)
     {

         OracleCommand oracmd = new OracleCommand();

         oracmd.CommandText = "insert into abys_uavt.DMA_ERROR_LOG (Exception_Message) values('table or view does not exist')";

         oracmd.ExecuteNonQuery();

     }

Error Message:

An unhandled exception of type 'System.InvalidOperationException' occurred in Oracle.DataAccess.dll

Additional information Operation is not valid due to the current state of the object.

您的OracleCommand实例未与打开的OracleConnection实例关联。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM