I have some code doing a very simple select "select bonusid from game where
gameid=@gameid" that works about 98% of the time, but somewhere around two
percent of the time it throws an exception. If I go through the sqlerror's
in the exception all it has is the following:

Index #0
Message: Unknown error.
LineNumber: 0
Source: .Net SqlClient Data Provider
Procedure:

Not very interesting is it. I've checked that the input is valid and I have
no problems running the same query manually. I also have yet to find a
consistent way to recreate this error but my clients are having no problems
doing it fairly frequently with no rhyme or reason that I can tell.

Although there are many clients simultaneously using the server they share
one database connection but I am very careful to only use the connection
through a wrapper class that Lock()'s the database connection. I'm really
lost on this one, has anyone else seen this? I could find next to nothing
on google/google groups.

Lloyd Christopher
SLOW30

Re: SqlException: Unknown Error by Mary

Mary
Tue Sep 06 11:42:24 CDT 2005

Without seeing the code and not really understanding your environment
or the technique you are using to "lock" the database connection, it's
hard to guess at what the problem might be. I'd recommend putting a
SQL Profiler trace on it and see if you can pinpoint where it's
failing (when it does fail).

--Mary

On Sat, 03 Sep 2005 00:49:19 GMT, "Lloyd" <lloydspamsodoff@slow30.com>
wrote:

>I have some code doing a very simple select "select bonusid from game where
>gameid=@gameid" that works about 98% of the time, but somewhere around two
>percent of the time it throws an exception. If I go through the sqlerror's
>in the exception all it has is the following:
>
>Index #0
>Message: Unknown error.
>LineNumber: 0
>Source: .Net SqlClient Data Provider
>Procedure:
>
>Not very interesting is it. I've checked that the input is valid and I have
>no problems running the same query manually. I also have yet to find a
>consistent way to recreate this error but my clients are having no problems
>doing it fairly frequently with no rhyme or reason that I can tell.
>
>Although there are many clients simultaneously using the server they share
>one database connection but I am very careful to only use the connection
>through a wrapper class that Lock()'s the database connection. I'm really
>lost on this one, has anyone else seen this? I could find next to nothing
>on google/google groups.
>
>Lloyd Christopher
>SLOW30
>