|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP在国内异常流行,因为国内大多使用的是盗版的Windows和盗版的SQLServer,而ASP+COM+SQLServer实际上也是一种不错的搭配,其性能也不输于PHP+MYSQL,特别是Windows系统和SQLServer都有图形界面,比APACHE和MYSQL易于维护,因此对于不重视知识产权的国家来说也是一种不错的选择。oracle|上传|上传图片|数据|数据库|成绩经由过程利用OleDb操纵Oracle数据库,乐成完成图片上传到Blob范例的字段,但偶然会产生ORA-01036毛病的成绩,经查询是毛病提醒为illegalvariablename/number,不晓得有谁能具体注释illegalvariablename/number的意义
OracleDataProviderfor.NET
Hi
IamusingODP.NET(OracleDataProviderfor.NET)inmyasp.netapplication.
Ihaveatableinmyoracledatabasecalled"equipmentgroup".Whenthepageloadsforthefirsttimeiretrievealltherecordsfromthetabletoadatasetandsaveittoviewstate.Lateronanyadditionormodificationisdoneinthedatasetonlyindisconnectedmode.Finally,whenuserclicksupdateicallthisfunction"update"whichshoulddoabatchupdatebutinsteaditgivesthefollowingerror:
"ORA-01036:illegalvariablename/number"
privatevoidupdate()
{
OracleParameterworkParam;
OracleConnectioncnn=newOracleConnection("DataSource=NEELESHR;UserId=tmse;Password=tmse;");
stringsql="INSERTINTOEquipmentGroup(Code,Description,LifeTime,PriamryLife,Grading,Inflator,ExtensionRate,MaintenanceFee)VALUES(:Code,:Description,:LifeTime,:PriamryLife,:Grading,:Inflator,:ExtensionRate,:MaintenanceFee)";
OracleCommandcmd=newOracleCommand(sql,cnn);
cmd.CommandType=CommandType.Text;
OracleDataAdapterda=newOracleDataAdapter();
da.InsertCommand=cmd;
workParam=da.InsertCommand.Parameters.Add("Code",OracleType.Char,10,"Code");
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("Description",OracleType.VarChar,50,"Description");
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("LifeTime",OracleType.Number);
workParam.SourceColumn="LifeTime";
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("PriamryLife",OracleType.Number);
workParam.SourceColumn="PriamryLife";
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("Grading",OracleType.Char,10,"Grading");
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("Inflator",OracleType.Number);
workParam.SourceColumn="Inflator";
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("ExtensionRate",OracleType.Number);
workParam.SourceColumn="ExtensionRate";
workParam.SourceVersion=DataRowVersion.Current;
workParam=da.InsertCommand.Parameters.Add("MaintenanceFee",OracleType.Number);
workParam.SourceColumn="MaintenanceFee";
workParam.SourceVersion=DataRowVersion.Current;
try
{
da.Update(ds,"EquipmentGroup");
}
catch(Exceptione)
{
Message.Text=e.Message;
}
}
Hi,
Ithinkthatyoushouldaddparameterswith":"included,like:
workParam=
da.InsertCommand.Parameters.Add(":Code",OracleType.Char,10,"Code");
OleDbDataProviderfor.NET
stringsql="INSERTINTOEquipmentGroup(Code,Description,LifeTime,PriamryLife,Grading,Inflator,ExtensionRate,MaintenanceFee)VALUES(?,?,?,?,?,?,?,?,)";
Hi,
Ithinkthatyoushouldaddparameterswith":"included,like:
workParam=
da.InsertCommand.Parameters.Add(":Code",OracleType.Char,10,"Code");
</p>缺点:安全性不是太差了,还行,只要你充分利用系统自带的工具;唯一缺点就是执行效率慢,如何进行网站优化以后,效果会比较好。 |
|