第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

Must declare the scalar variable

標(biāo)簽:
JavaScript

 

Server Error in '/Website1' Application.


Must declare the scalar variable "@Author".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Must declare the scalar variable "@Author".

Source Error:

Line 29:     private void Data_Binding()Line 30:     {
Line 31: this.GvCycleCountFile.DataSource = objCycleCountFile.GetCycleCountFileByAuthor(InsusBase.SystemId);
Line 32:         this.GvCycleCountFile.DataBind();Line 33:     }


Source File: d:\IntranetSites\ERP\System\SyteLine\PhysicalTag\CycleCountSheet.aspx.cs Line: 31

Stack Trace:

[SqlException (0x80131904): Must declare the scalar variable "@Author".]   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2030802   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5009584   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +234   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2275   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33   System.Data.SqlClient.SqlDataReader.get_MetaData() +86   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +311   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +987   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +10   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +144   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +319   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +94   Insus.NET.Base.ExecuteProcedure(String procedureName, DataSet& dataSet, SqlParameter[] prams) +189[Exception: Must declare the scalar variable "@Author".]   Insus.NET.Base.ExecuteProcedure(String procedureName, DataSet& dataSet, SqlParameter[] prams) +253   Insus.NET.BusinessBase.GetDataToDataSet(String procedureName, Parameter[] sqlParameter) +326   Insus.NET.CycleCountFile.GetCycleCountFileByAuthor(String author) +88   System_SyteLine_PhysicalTag_CycleCountSheet.Data_Binding() in d:\IntranetSites\ERP\System\SyteLine\PhysicalTag\CycleCountSheet.aspx.cs:31   System_SyteLine_PhysicalTag_CycleCountSheet.Page_Load(Object sender, EventArgs e) in d:\IntranetSites\ERP\System\SyteLine\PhysicalTag\CycleCountSheet.aspx.cs:23   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35   System.Web.UI.Control.OnLoad(EventArgs e) +91   System.Web.UI.Control.LoadRecursive() +74   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

 


 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

 

软件在开发端没有问题,发布到服务端没有问题,但交给客户有问题,出现如上错误。最终检查得出结果,开发与测试时都是使用管理员的权限去做测试,当然通过一切障碍。

可以看到下面这个存储过程,当用管理员去run时,它只跑IF节,从没有机会跑过ELSE部分的代码,现交给到客户了,用户使用其他权限去跑,问题出来了:

 

 

动态变量@Author无法被组合成的sql所识别。Insus.NET把它修改一下:

EXECUTE(@sql + ' WHERE [Author] = ' + @Author +' ORDER BY [CreateDate] DESC')

 

得出结论,软件开发,是用户使用之后,才会发现问题。

點(diǎn)擊查看更多內(nèi)容
TA 點(diǎn)贊

若覺得本文不錯(cuò),就分享一下吧!

評論

作者其他優(yōu)質(zhì)文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學(xué)習(xí),寫下你的評論
感謝您的支持,我會(huì)繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會(huì)直接到老師賬戶
支付方式
打開微信掃一掃,即可進(jìn)行掃碼打賞哦
今天注冊有機(jī)會(huì)得

100積分直接送

付費(fèi)專欄免費(fèi)學(xué)

大額優(yōu)惠券免費(fèi)領(lǐng)

立即參與 放棄機(jī)會(huì)
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

舉報(bào)

0/150
提交
取消