ORA-01008: 并非所有变量都已绑定,所有的变量值都有了,怎么还有这个问题
stringsql="insertintoSYS_Table_total(ID,table_name,table_Cname,table_shuoming,table_d...
string sql = "insert into SYS_Table_total(ID,table_name,table_Cname,table_shuoming,table_date,table_user) values( :ID,:table_name,:table_Cname,:table_shuoming,:table_date,:table_user)";
赋值的代码:
model.table table_add = new model.table();
table_add.Table_Cname = Table_Cname;
table_add.Table_date = Table_date;
table_add.Table_name = Table_name;
table_add.Table_shuoming = Table_shuoming;
table_add.Table_user = Table_user;
table_add.ID = id;
OracleParameter[] parameters = new OracleParameter[]
{
new OracleParameter(":table_name", OracleType.VarChar, 40),
new OracleParameter(":table_shuoming", OracleType.VarChar, 40),
new OracleParameter(":table_Cname", OracleType.VarChar, 40),
new OracleParameter(":table_date", OracleType.DateTime),
new OracleParameter(":table_user", OracleType.VarChar, 40),
new OracleParameter(":ID", OracleType.VarChar, 40),
};
parameters[0].Value = dal_table.Table_name;
parameters[1].Value = dal_table.Table_shuoming;
parameters[2].Value = dal_table.Table_Cname;
parameters[3].Value = dal_table.Table_date;
parameters[4].Value = dal_table.Table_user;
parameters[5].Value = dal_table.ID; 展开
赋值的代码:
model.table table_add = new model.table();
table_add.Table_Cname = Table_Cname;
table_add.Table_date = Table_date;
table_add.Table_name = Table_name;
table_add.Table_shuoming = Table_shuoming;
table_add.Table_user = Table_user;
table_add.ID = id;
OracleParameter[] parameters = new OracleParameter[]
{
new OracleParameter(":table_name", OracleType.VarChar, 40),
new OracleParameter(":table_shuoming", OracleType.VarChar, 40),
new OracleParameter(":table_Cname", OracleType.VarChar, 40),
new OracleParameter(":table_date", OracleType.DateTime),
new OracleParameter(":table_user", OracleType.VarChar, 40),
new OracleParameter(":ID", OracleType.VarChar, 40),
};
parameters[0].Value = dal_table.Table_name;
parameters[1].Value = dal_table.Table_shuoming;
parameters[2].Value = dal_table.Table_Cname;
parameters[3].Value = dal_table.Table_date;
parameters[4].Value = dal_table.Table_user;
parameters[5].Value = dal_table.ID; 展开
若以下回答无法解决问题,邀请你更新回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询