62,046
社区成员
发帖
与我相关
我的任务
分享
Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, IDbTransaction transaction, String sql, Action`2 paramReader, Object obj, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:1926
Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:710
Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, IDbTransaction transaction, String sql, Action`2 paramReader, Object obj, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:1926
Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:710
Nullable`1 commandTimeout, Nullable`1 commandType??? 是指我的后两个参数为空所导致的吗?
再次谢过
Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, IDbTransaction transaction, String sql, Action`2 paramReader, Object obj, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:1926
Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:710
Nullable`1 commandTimeout, Nullable`1 commandType??? 是指我的后两个参数为空所导致的吗?',' 附近有语法错误。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: ',' 附近有语法错误。
源错误:
行 1924: cmd = SetupCommand(cnn, transaction, sql, paramReader, obj, commandTimeout, commandType);
行 1925: if (wasClosed) cnn.Open();
行 1926: return cmd.ExecuteNonQuery();
行 1927: }
行 1928: finally
源文件: G:\647\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs 行: 1926
堆栈跟踪:
[SqlException (0x80131904): ',' 附近有语法错误。]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +2062238
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +5050268
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.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +215
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +178
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
Dapper.SqlMapper.ExecuteCommand(IDbConnection cnn, IDbTransaction transaction, String sql, Action`2 paramReader, Object obj, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\647\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:1926
Dapper.SqlMapper.Execute(IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Nullable`1 commandTimeout, Nullable`1 commandType) in G:\647\VS项目\WebApplication1\MySolution\MvcDemo3\Dapper\SqlMapper.cs:710
Dal.AlbumSeviceDal.AddAlbum(Album album) in G:\647\VS项目\WebApplication1\MySolution\MvcDemo3\Dal\AlbumSeviceDal.cs:87
Bll.AlbumSeviceBll.AddAlbum(Album album) in G:\647\VS项目\WebApplication1\MySolution\MvcDemo3\Bll\AlbumSeviceBll.cs:35