Hello: I experience this type of error when I send a empty string in the
parameter. For example:
I have a dropdown and the components in this dropdown are in the
index(0) empty, index(1), index(2), Index(n) for the selection of items.
Then in the event of the
Dropdown_SelectedIndexChanged I implemented the iBATIS code. If want to
unselect the item and chose in the dropdown list the index(0) which is
"" and send the object with the property string "" the error occurs.
Thanks in advance for the help.
Parameter 'param0': No size set for variable length data type: String.
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.Exception: Parameter 'param0': No size set for
variable length data type: String.
Source Error:
Line 405: using ( IDbCommand command =
_preparedCommand.Create( request, session, this.Statement,
parameterObject ) )
Line 406: {
Line 407: using ( IDataReader reader =
command.ExecuteReader() )
Line 408: {
Line 409: if ( reader.Read() )
Source File:
C:\Inetpub\wwwroot\ISOtrainV630\IBatisNet.DataMapper\MappedStatements\Ma
ppedStatement.cs Line: 407
Stack Trace:
[Exception: Parameter 'param0': No size set for variable length data
type: String.]
System.Data.OracleClient.OracleParameterBinding.PrepareForBind(OracleCon
nection connection, Int32& offset)
System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean isReader, Boolean
needRowid, OciHandle& rowidDescriptor, ArrayList&
refCursorParameterOrdinals)
System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, ArrayList&
refCursorParameterOrdinals)
System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior
behavior)
System.Data.OracleClient.OracleCommand.ExecuteReader()
System.Data.OracleClient.OracleCommand.System.Data.IDbCommand.ExecuteRea
der()
IBatisNet.DataMapper.MappedStatements.MappedStatement.RunQueryForObject(
RequestScope request, IDalSession session, Object parameterObject,
Object resultObject) in
C:\Inetpub\wwwroot\ISOtrainV630\IBatisNet.DataMapper\MappedStatements\Ma
ppedStatement.cs:407
IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObj
ect(IDalSession session, Object parameterObject, Object resultObject) in
C:\Inetpub\wwwroot\ISOtrainV630\IBatisNet.DataMapper\MappedStatements\Ma
ppedStatement.cs:386
IBatisNet.DataMapper.MappedStatements.MappedStatement.ExecuteQueryForObj
ect(IDalSession session, Object parameterObject) in
C:\Inetpub\wwwroot\ISOtrainV630\IBatisNet.DataMapper\MappedStatements\Ma
ppedStatement.cs:369
IBatisNet.DataMapper.SqlMapper.QueryForObject(String statementName,
Object parameterObject) in
C:\Inetpub\wwwroot\ISOtrainV630\IBatisNet.DataMapper\SqlMapper.cs:616
ISOtrain.Persistence.Mapper.BaseSqlMapDao.ExecuteQueryForObject(String
statementName, Object parameterObject) in
C:\Inetpub\wwwroot\ISOtrainV630\ISOtrain.Persistence\BaseSQLMap.vb:39
[IBatisNetException: Error executing query 'SelectDeviationTypeById' for
Object. Cause: Parameter 'param0': No size set for variable length data
type: String.]
ISOtrain.Persistence.Mapper.BaseSqlMapDao.ExecuteQueryForObject(String
statementName, Object parameterObject) in
C:\Inetpub\wwwroot\ISOtrainV630\ISOtrain.Persistence\BaseSQLMap.vb:41
ISOtrain.Persistence.Mapper.Maintenance.DeviationTypeSqlMap.SelectByID(D
eviationType objDeviationType) in
C:\Inetpub\wwwroot\ISOtrainV630\ISOtrain.Persistence\Mapper\Maintenance\
DeviationTypeSqlMap.vb:92
ISOtrain.EmpExceptionModify.ddlExceptionType_SelectedIndexChanged(Object
sender, EventArgs e) in
c:\inetpub\wwwroot\ISOtrainV630\Employee\EmpExceptionModify.aspx.vb:1479
System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs
e)
System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandle
r.RaisePostDataChangedEvent()
System.Web.UI.Page.RaiseChangedEvents()
System.Web.UI.Page.ProcessRequestMain()
________________________________
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032