我已尽力插入到oracle数据库中。但是当我查询它时,我在数据库中什么都没找到。但它在每个执行者查询中都没有返回数据库中的数据。请在下面找到我的代码
queryString = "INSERT INTO btable (CH_CODE, ME_NUM, CY_CODE, ER_CODE, SUB_CODE, _LIM, LIM__DATE)" +
" VALUES ('" + int.Parse(rows["ch_code"].ToString()) + "','" + int.Parse(rows["me_numb"].ToString()) + "','" + int.Parse(rows["cy_code"].ToString()) + "','" + int.Parse(rows["er_code"].ToString()) + "','" + int.Parse(rows["Sub_code"].ToString()) + "','" + double.Parse(rows["_limit"].ToString()) + "'," + "to_date('" + usedate +"','dd/mm/yyyy')" + "')";
command = new OracleCommand(queryString, conn);
command.Connection = conn;
if (command.Connection.State == ConnectionState.Closed)
{
command.Connection.Open();
}
//command.Connection.Open();
command.ExecuteNonQuery();
if (command.ExecuteNonQuery() > 0)
{
intResult++;
}
连接字符串是
<add key="OraConnString" value="Data Source=testdr.world;Persist Security Info=False;user id=****;password=****"></add>
在程序中称为
OracleConnection conn = new OracleConnection(ConfigurationManager.AppSettings["OraConnString"]);
OracleCommand command;
数据库是一个oracle数据库