Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

ODBC SQL Server database reconnect questions
I have an ODBC 3.0 Application on Windows NT Server maintaining a
connection to a SQL Server 2000 database on the same machine. When an
error occurs, I'd like to be able to determine whether the error is
serious enough that the database connection has been lost, so I can
have the application try to reconnect automatically. My understanding
is that any error of severity 20 or above includes a broken connection,
but I'm having difficulty retrieving the error severity through ODBC.
So my first question is, how do I retrieve the error severity through
ODBC?

Also, as a test, I stopped the database while my application is still
running, and the first error I received had a native error code of 55.
There is no 55 error in the sysmessages table, so I'm confused as to
what the severity of the error is. Can anyone shed some light on why I
would be receiving an error code that is not in the sysmessages table,
and where I might be able to find more information about the error?

Thanks in advance,
Abram


Report this thread to moderator Post Follow-up to this message
Old Post
Abram
08-22-05 04:23 PM


Re: ODBC SQL Server database reconnect questions
I'm not at all familiar with ODBC, however if there's a fatal error
which breaks the connection, it seems unlikely that the server will be
able to inform the client, so I don't see how you could guarantee that
you'll get the MSSQL severity level in a client application (although
it should be logged on the server).

I think you should probably have a look at whatever ODBC errors might
be raised in this situation, although as I said I don't know much about
ODBC, so I may be on the wrong track. In any case, it might be worth
asking the question in an ODBC group as well - handling unexpected
disconnections from a remote data source is probably not specific to
MSSQL.

As for error 55, it's probably Windows error 55 - try typing this at a
command prompt:

NET HELPMSG 55

Simon


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
08-22-05 04:23 PM


Re: ODBC SQL Server database reconnect questions
Thanks Simon. I've cross-posted on microsoft.public.data.odbc as well.
I think you're right about error 55. Thanks again!

Abram


Report this thread to moderator Post Follow-up to this message
Old Post
Abram
08-22-05 04:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:50 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006