Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Server Error in '/' Application

Author  Topic 

Mit09
Starting Member

1 Post

Posted - 2009-07-16 : 02:25:46
Hello, I'm having server error problems and have no idea how to fix it. I am copying and pasting my error message. I'm not computer savy so please help me in baby steps. Thanks
Server Error in '/' Application.

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
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: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[SqlException (0x80131904): Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.HasMoreRows() +150
System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +212
System.Data.SqlClient.SqlDataReader.Read() +9
System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +153
System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +153
System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +170
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +175
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +86
Jenkon.Web.CompiledControls.Default.JHeader.GetNavDataTab() in C:\Inetpub\wwwroot\Customer_Builds\IOI_CUST038_6.5.2\Jenkon\WebApps\CompiledControls\Default\JHeader.cs:515
Jenkon.Web.CompiledControls.Default.JHeader.FillNavigation() in C:\Inetpub\wwwroot\Customer_Builds\IOI_CUST038_6.5.2\Jenkon\WebApps\CompiledControls\Default\JHeader.cs:317
Jenkon.Web.CompiledControls.Default.JHeader.Initialize() in C:\Inetpub\wwwroot\Customer_Builds\IOI_CUST038_6.5.2\Jenkon\WebApps\CompiledControls\Default\JHeader.cs:158
Jenkon.Web.CompiledControls.Default.JHeader.CreateChildControls() in C:\Inetpub\wwwroot\Customer_Builds\IOI_CUST038_6.5.2\Jenkon\WebApps\CompiledControls\Default\JHeader.cs:677
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433



Mitzi Phillips

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2009-07-16 : 11:05:34
The exception details are pretty specific...
"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."

You need to look at your SQL statement. There's a subquery that returns more than one value in a condition that only accepts one value. If you need help with that, please post your SQL statement.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-16 : 12:27:18
seems like you're using a subquery which is returning multiple values in a context where only single value is allowed. If you can post query, somebody will be able to provide more help
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2009-07-16 : 15:59:06
change your query to return a DISTINCT value
Go to Top of Page

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2009-07-17 : 09:39:07
Just adding DISTINCT to the subquery doesn't guarantee it will only return 1 value.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-07-17 : 13:08:31
yeah...thats true. DISTINCT just ensures the result set contains distinct combination of values not a single value alone
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2009-07-17 : 23:31:29
sorry, what i meant was to say, that the values being returned to the .net application is more than one row.

... hence the error
Go to Top of Page
   

- Advertisement -