PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Phantom Exception
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Phantom Exception
![]() |
Phantom Exception |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have a small problem.
Any suggestion would be greatly appreciated. I am developing an application that is projected to contain 3 million active records accessed by 40 to 50 users on a LAN and several website connections channeled through our local webserver. At the moment I am using one client running winXP pro and vb.net, one database server running win2000 server SP3 and SQL server 7.0, and a small test database of 80,000 records. In the VB app I use a shared connection across several forms. I use the connection to populate several classes for lookup lists which it does. But when I use it to populate a dataset from a stored procedure, it returns the records and an exception. The return set is not large, 1000 rows by 45 columns. The error number returned is "0" and the severity is "10". This should be a message and not an error. I have tried reducing the row count and increasing the connection and command timeouts without success. Using the Query analyzer on both the client and the server, the sproc runs without error. I trap the @@error variable within the sproc and it reports no error. The sproc runs in about 15 seconds in the analyzer. I can even use an Access ADP file on the client to run the sproc. I have moved the database to the client using SQL severs 7.0 version of MSDE and the sproc runs without error. I have included the subroutine that I am using and the error message that it produces. Thanks in advance, Carl Yos Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cmdGetData As New SqlCommand ("sproc_ViewCombinedAllOrdersRowCount1000", frmStartup.cnWO) cmdGetData.CommandTimeout = 1000 Dim daGetData As New SqlDataAdapter(cmdGetData) Dim frmStatusMessage As New frmStatus() frmStatusMessage.Show("Gathering data from Work Order Database") Try frmStartup.cnWO.Open() 'daGetData.FillSchema(frmStartup.dsNewOrder, SchemaType.Source, "Orders") daGetData.Fill (frmStartup.dsNewOrder, "Orders") Catch myException As SqlException Dim i As Integer Dim strMsg As String For i = 0 To myException.Errors.Count - 1 strMsg &= "Index #" & i & ControlChars.NewLine & _ "Source: " & myException.Errors (i).Source & ControlChars.NewLine & _ "Number: " & myException.Errors (i).Number.ToString() & ControlChars.NewLine & _ "State: " & myException.Errors (i).State.ToString() & ControlChars.NewLine & _ "Class: " & myException.Errors (i).Class.ToString() & ControlChars.NewLine & _ "Server: " & myException.Errors (i).Server & ControlChars.NewLine & _ "Message: " & myException.Errors (i).Message & ControlChars.NewLine & _ "Procedure: " & myException.Errors (i).Procedure & ControlChars.NewLine & _ "LineNumber: " & myException.Errors (i).LineNumber.ToString() Next i Console.WriteLine(strMsg) MessageBox.Show(strMsg) strMsg = myException.ToString Console.WriteLine(strMsg) MessageBox.Show(strMsg) Finally frmStartup.cnWO.Close() End Try frmStatusMessage.Close() DataGrid1.DataSource = frmStartup.dsNewOrder.Tables("orders") End Sub Index #0 Source: .Net SqlClient Data Provider Number: 0 State: 0 Class: 10 Server: SUNTEC-NRD-DEVS Message: A severe error occurred on the current command. The results, if any, should be discarded. Procedure: LineNumber: 0 System.Data.SqlClient.SqlException: A severe error occurred on the current command. The results, if any, should be discarded. at System.Data.SqlClient.SqlConnection.OnError (SqlException exception, TdsParserState state) at System.Data.SqlClient.SqlInternalConnection.OnError (SqlException exception, TdsParserState state) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() at System.Data.SqlClient.TdsParser.ProcessDone (SqlCommand cmd, RunBehavior run) at System.Data.SqlClient.TdsParser.Run(RunBehavior run, SqlCommand cmdHandler, SqlDataReader dataStream) at System.Data.SqlClient.SqlDataReader.get_HasMoreRows () at System.Data.SqlClient.SqlDataReader.Read() at System.Data.Common.DbDataAdapter.FillLoadDataRow (SchemaMapping mapping) at System.Data.Common.DbDataAdapter.FillFromReader (Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) at System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) at WOwithModule.frmDataGrid.Button1_Click(Object sender, EventArgs e) |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

