ORACLE:
:var
cmd.CommandText = "insert into ARADMIN.BEM_EVENTS(mc_host,mc_host_address,mc_object_class,event_time,status,severity,msg) VALUES(:mc_host,:mc_host_address,:mc_object_class,:event_time,:status,:severity,:msg)";
在对变量进行赋值的时
OracleParameter("mc_host",OracleType.VarChar,100) //mc_host前面没有 :
SQL Server:
@var
string sqlstr = "select business from staff_business where staffid = @staffid";
在对变量进行定义、赋值的时
SqlParameter parameterLoginID = new SqlParameter("@staffid",SqlDbType.VarChar,10); //staffid前面有@