Internal connection fatal error and other random db connection errors

Hi guys!

My newly built website has just recently went online,

but sometimes I face errors (randomly) like these:

 

System.IndexOutOfRangeException: There is no row at position 0.
System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.
System.IndexOutOfRangeException: Cannot find table 0

System.NullReferenceException: Object reference not set to an instance of an object.

System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.

System.InvalidOperationException: Internal connection fatal error.
.
.
.
ExecuteReader

I use a dbmanager class as a wrapper for db ,

which I uploadere here:

 

http://mihd.net/9k47re

 

The strange thing is that both iis and the database lie on the same machine,

but I use tcp/ip for incoming connections,

so,

could anyone help me get rid of these errors somehow?

thanks in advance! 

0
patrickdrd
6/14/2007 9:42:45 AM
asp.net.getting-started 91979 articles. 3 followers. Follow

17 Replies
1567 Views

Similar Articles

[PageSpeed] 42

Hi patrickdrd,

Is your problem resolved? It seems that we should know your code and then can solve it. But there is nothing including that picture.

Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/18/2007 9:09:47 AM

something must be going wrong with my db manager wrapper class,

I made some changes,

things seem a bit better,

if anyone wants to check out, here it is:

http://mihd.net/fv3bo9
 

0
patrickdrd
6/18/2007 11:40:53 AM

Hi,

There is no way to check it out. Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/18/2007 11:54:03 AM

why not?

 

sure there is! 

0
patrickdrd
6/18/2007 12:04:42 PM

When I open it, I just find a lot of advertisements. Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/18/2007 12:15:01 PM
ok, so, where would you like me to upload that?
0
patrickdrd
6/18/2007 11:03:54 PM

Let me know your code and that line which cause this error. Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/19/2007 12:30:49 AM

thank you! 

 

 Error >> Internal connection fatal error. <<
Source >> System.Data <<
Trace  >>    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, 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)
   at infoquest.ticketing.helperclasses.DBManager.ExecuteQuery(String Query, DataSet& Results) in

...DBManager.vb:line 419 <<

0
patrickdrd
6/19/2007 9:38:14 AM

Where is code? Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/19/2007 9:44:10 AM

nothing special with the code, just a query to fetch some data, which DOES work under normal circumstances!

 

 

 
      Dim Sql As String = String.Empty
      Dim Ds As New DataSet
      'Sql = "SELECT DISTINCT TOP (SELECT CAST(a01_value AS INT) FROM A01_OPTIONS WHERE a01_name = 'MAX_EVENTS_TO_DISPLAY')  d02_name + ' - ' + d12_headline headline, d12_id, d12_rank " & _
      Sql = "SELECT DISTINCT TOP 5 d02_name + ' - ' + d12_headline headline, d12_id, d12_rank " & _
            "FROM   D12_EVENTS D12 " & _
            "  INNER JOIN D02_VENUES D02             ON D12.d12_d02_id = D02.d02_id " & _
            "  INNER JOIN D07_EVENTTYPES D07         ON D12.d12_d07_id = D07.d07_id " & _
            "  LEFT OUTER JOIN D13_EVENTSDETAILS D13 ON D12.d12_id     = D13.d13_d12_id " & _
            "  INNER JOIN I03_EVENTDETAILSPRICES ON i03_d13_d12_id = d12_id " & _
            "WHERE LOWER(D07.d07_descrsys) = '" & eventTypeDescrSys & "' " & _
            "AND   D12.d12_recdeleted = 0 " & _
            "AND   ISNULL(D13.d13_recdeleted,0) = 0 " & _
            "AND   ISNULL(D13.d13_starttime, '1970-01-01') > GETDATE() " & _
            "ORDER BY D12.d12_rank "
      g_DBMan.ExecuteQuery(Sql, Ds)
      Return Ds
 
0
patrickdrd
6/19/2007 11:26:22 AM

Hi,

I don't know what g_DBMan is, but it seems there is no connection and close for your sql and then there is no record implementing your dataset.

Hope this helps.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/19/2007 11:55:02 AM

g_DBMan is a global variable containing an instance of the previous attachment (dbmanager),

the connection is started first using:

 

g_DBMan.OpenConnection(enProvider.enP_SQLServer, GlobalDeclarations.DBConnectionString)

 
and the dataset is used on the code behind file

I'm not a newbie my friend, I released my third web site a month ago,

and the messages I was talking about DO NOT appear always,

but RANDOMLY on my website!

I have a feeling that it has to do with that dbmanager class,

that's why I uploaded ,

so please can someone take a look and tell me? 

0
patrickdrd
6/19/2007 12:18:29 PM

Hey guys,

 Don't know if this is something you've managed to solve yet but if not then I could also use some help.  Getting this error and numerous similar errors that imply issues with connection pooling.  I'm also using a dbmanager utility class.  Relevant code posted below:

 FUNCTION TO CREATE AND PASS ACTIVE SQLDATAREADER

Public Function ExecuteSprocAsReader(ByVal sproc As String, ByVal params As SqlParameter()) As SqlDataReader

_connection = New SqlConnection(_connectionString)  

_connection.Open()

_command = New SqlCommand

_command.Connection = _connection

_command.CommandType = CommandType.StoredProcedure

_command.CommandText = sproc

If Not (IsNothing(params)) Then
For Each param As SqlParameter In params

If Not IsNothing(param) Then

_command.Parameters.Add(param)

End If

Next

End If

Dim reader As SqlDataReader

Try

reader = _command.ExecuteReader(CommandBehavior.CloseConnection)

Catch ex As SqlException

Return Nothing

End Try

Return reader

End Function

 

CODE THAT IS CALLING THIS FUNCTION (where db is an instance of the dbmanager utility class and params is an array of SqlParameters):

Dim sqlReader As SqlDataReader = db.ExecuteSprocAsReader("sp_getnewsletter_by_id", params)

Dim newsletterName As String

sqlReader.Read()

newsletterName =
CStr(sqlReader("Title"))

sqlReader.Close()


Chris Disley
Senior Analyst Developer
Barlow Lyde & Gilbert LLP
w: http://www.blg.co.uk
0
Chris
6/20/2007 12:15:45 PM

I'm glad to see that somebody else has similar problems,

I haven't solved the problem yet,

but did a lot of google search and nothing helped me out!

0
patrickdrd
6/20/2007 12:55:17 PM

so, anyone with some time to check our db manager and tell us what's wrong?

I keep getting errors that I can't figure out, nor can I reproduce,

for example "There is already an open DataReader associated with this Command which must be closed first"

when calling DBManager.ExecuteQuery(String Query, DataSet& Results) 

Here are some mirrors to get the file:

http://www.zshare.net/download/23740747600ac1/
http://uploaded.to/?id=2bs0a7w2phnvjdov9c8iygggm899lx3d
http://www.egoshare.com/10b8673cba36e40ca8846ff0d2804240/dbmanagerzip.html
http://www.speedshare.org/cDRo1A19O9
http://ultrashare.de/f/2236/DBManager.zip.html
http://www.megaupload.com/?d=P3C8XG6Z
http://depositfiles.com/files/1067449

0
patrickdrd
6/21/2007 11:37:46 PM

 MARS (multiple active resultsets) might help

MultipleActiveResultSets=True (inside the connection string) 

(only available for SQL-2005 connections and ado.net-2.0)

0
patrickdrd
6/23/2007 5:05:13 PM

reading these two might help some people:

http://www.velocityreviews.com/forums/t95630-sporadic-error-cannot-find-table-0.html

and

http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic9111.aspx 

0
patrickdrd
6/25/2007 9:55:31 PM
Reply:

Similar Artilces:

help. when using Profile GetPropertyValue, I get the following connection error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure
 Hi,I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property((string)(this.GetPropertyValue("Address1")));When I look at the stack, it is coming from my ProfileWrapper class which adds user address, city, etc.. from a class which inherits fromSystem.Web.Profile.ProfileBase. From the stack, it is calling the System.Web.Profile and crashed when it tries to open a connection atSystem.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObj...

[connect error] Interbase Connect Error
In ODBC connect test is successfully.. but in PowerBuilder 6.5 Database Profiles is displayed error message.. Error Message is SQLSTATE = 40001 [Easysoft][Interbase]Dynamic SQL Error, SQL error code = -91, feature is not supported What means this message? Now I use PowerBuilder 6.5 & Interbase 5.6... Just I choose - Profile Name - Data Source --> This is ODBC DNS..(user DNS) - User ID - Password Does it need more? ...

upgrade error:"CONNECTIVITY ERROR:DB-Library: "SQL Server connection timed out."
PLEASE HELP OH WISE SYBASE GURUS! upgrading 11.9.2 to 12.0. unloaded software. rebooted server. selected "upgrade server" in Configure Sybase Servers window. typed in sa password. got "CONNECTIVITY ERROR: DB-Library: "SQL Server connection timed out." -- Chuck Boyce chuck_boyce@operamail.com http://www.geocities.com/chuck_boyce_jr/ Yahoo Messenger ID: chuck_boyce_jr http://messenger.yahoo.com AOL Instant Messenger ID: sg95m476 http://www.aol.com/aim/ ICQ Messenger ID: 41449031 http://www.icq.com ...

Connection error
We have see the message: Connection error - An error occurred during the TCPIP connection attempt twice now. The first time was a laptop that had not been used in a while. Now we are seeing the same message while trying to connect to a computer where ASA has just been installed. brian Brian Howard wrote: > We have see the message: > > Connection error - An error occurred during the TCPIP > connection attempt > > twice now. The first time was a laptop that had not been > used in a while. Now we are seeing the same message while > trying to connec...

Connection to ASA DB with WLAN connection why no error?
Hi, The connection to the database with a Windows CE mobile works with WLAN connection. DSN File : [ODBC] uid=dba pwd=sql enginename=tlbmobile_proxy Links=TCPIP(DOBROADCAST=DIRECT;HOST=194.124.250.130) databasename=tlbmobile_proxy Driver=\windows\dbodbc10.dll But I become no error when the server is not started or the WLAN connection is stopped. In my Pocketbuilder application, I wait... I wait... and nothing. Can you help me please. Thanks ...

Internal connection fatal error
I am getting this error "Internal connection fatal error." on one of my .net pages and am completely stumped. It's a basic page with a datagrid and a parameter for "type". There are 2 types, either "Member" or "Contact", if the query is Member then the datagrid works, however if it's contact then I get the error. I have double checked the database and the spelling is correct in the stored proc. If I use the stored proc in an ASP page then it works without error. Code in .NET page:     Sub BindGrid()     &...

Internal connection fatal error.
Hi all,I don’t know what happened to this function which was working OK for a few month and today it doesn’t work.In debug mode I kip getting “InvalidOperationaException was unhandled by user code”On this line:dtrResults = cmdSelect.ExecuteReader()Same behaviour on developping PCI cant find anithing that would create that problem. Function GetUserInfo(ByVal myUsr As String, ByVal strRequest As String) As String Dim strConString As String Dim conUsers As SqlConnection Dim cmdSelect As SqlCommand strConString = ConfigurationSett...

Connection Error
When attempting to create a new query in Excel to access information from the Sybase database (blue) MS Query fatal errors and these are the only details: AppName: msqry32.exe AppVer: 10.0.2607.0 ModName: syodase.dll This was working up until recently. Is there a maximum limit on ports or connections for a sybase connection? We have been running and still are deploying, excel tools to display national data from our symposium databases, all of a sudden i am unable to build any more tools! Excel version is 2002 Windows version XP SP2 Symposium 4.01.07 Sybase ODBC connection (u...

Getting a non fatal error after Connect to Oracle
HI, I am running perl 5.00503 on a SCO UnixWare 7.1.1 box with Oracle 8.16 installed. I am using DBI version 1.21 and DBD::Oracle Version 1.12 to connect to the database. What I am trying to do is to write a piece of Java which will run the Perl script I am writing on the server. The Perl script works without crashing when run from the prompt. When I run it through the Java script I have borrowed (got it from http://asktom.oracle.com/pls/ask/f?p=4950:8:989284::NO::F4950_P8_DISPLAYID,F 4950_P8_CRITERIA:952229840241,%7BJAVA%7D%20and%20%7BUnix%7D ) it crashes and displays a system e...

Why am I getting a cannot connect, database engine not started error?
I have created an .exe file for distribution...however, when i run it i get an error saying it cannot connect to the database, database engine not started. If I open powerbuilder, start the engine, and then run the exe file..it works fine. What am I missing in my exe or project? Thanks in Advance, RC I guess your exe is trying to connect over network and your database server is installed on your development machine. Assuming that you are using ASA, it has an option to tell the db engine to start if its not already started (ODBC DSN properties). This works fine if the app and t...

ERROR : Could not connect: ERROR OCIEnvInit
------=_NextPart_000_0027_01C68FDF.D230F2A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi,=20 I am Sundeep Maini. I read your article in one of the forum online. This regarding the Perl Module error encountered while a script in my = system tries to connect to a CGI Script. Just to give you a brief overview. I recently had a database upgrade from Oracle 8i (8.1.7) to Oracle 9i = (9.2.0). Earlier, the application was using Oracle 8i database. As part of process I have updated the ORACLE_HOME env to = /opt/oracle/produc...

error error error
These are the 2 new errors i am getting now:   1).  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 53: ...

errors errors errors..
Name: harun Email: harunbjk1903hrnatgmaildotcom Product: Firefox Summary: errors errors errors.. Comments: first of all when i launch firefox (3) i cant enter websites via writing.. for example when I type "google" and then press ctrl and enter, it crashes.. and i take lots of error reports. firefox 2 was better.. see you again , harun Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9) Gecko/2008052906 Firefox/3.0 From URL: http://hendrix.mozilla.org/ ...

Error, Error and more errors
Okay, all I wanted to do was test this app out and it has been a nightmare. 1.) Didn't install the sql database. I had to manually install it. 2.) I get errors when trying to add a picture to an album. "Procedure or function ngUpdatePicture has too many arguments specified" Any ideas? I've gotten more errors than this, but there is no use in bitchin. Are you using the v1.6.1 installer? Also, did you select to install the SQL Server db and give it a valid admin login? What were some of the error messages? Did you have an existing DB from a previous install? ...

Web resources about - Internal connection fatal error and other random db connection errors - asp.net.getting-started

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
If you send more email, you might make more money. Then again, you might destroy your reputation and revenue stream. Here's how to know what ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

MOTHER’S DAY: Facebook Examines Connections Between Moms, Kids
With Mother’s Day on the calendar this coming Sunday, Facebook examined the relationships between mothers and their children on the social network, ...

Kings Cross identities arrested in connection with murder
Two Kings Cross identities&nbsp;have been arrested in connection with the murder of a man at Sydney hotel.

Faith: Spirits lift in connection with home
We need to more adequately understand the spirituality of our unique place on earth.

FBI mulls connection between Super Bowl, CA fiber optic cable cuttings
... authorities, who have been baffled by more than a dozen attacks on San Francisco Bay Area data lines, are probing whether there is any connection ...

Report: Man arrested in connection with Ashley Olsen's murder
Italian media agency reports that a non-EU male has been arrested in the murder of the 35-year-old American

Toyota and Kymeta rely on satellites to power this Mirai's data connection
They're hoping to achieve gigabit wireless speeds within the next few years.

Star Wars Rebels Trailer Reveals Force Awakens Connection - Collider
The new extended trailer for the mid-season premiere of the Disney XD animated series Star Wars Rebels reveals a huge connection to The Force ...

Resources last updated: 1/22/2016 8:07:29 PM