473,396 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

Aug 22 '05 #1
2 2803
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

Aug 22 '05 #2
Thanks Simon. I've cross-posted on microsoft.public.data.odbc as well.
I think you're right about error 55. Thanks again!

Abram

Aug 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
8
by: Philip Wright | last post by:
I am trying to connect to a DB2 v7.2 database from Lotus 123 v9.8 on a Windows XP Pro machine. I have the Software Development Client installed on the XP machine and have run the Client...
4
by: Jacob Pallapati | last post by:
Hi, I need to create an ODBC connection for one of my databases from the command line. I could use db2 catalog system odbc database source <my-database>. But I want to create a DSN with a name...
5
by: Todd Huish | last post by:
I have noticed something disturbing when retrieving datasets over a relatively slow line (multiple T1). I am looking at about 25 seconds to retrieve 500 rows via a php-odbc link. This same select...
8
by: Dominic Martin | last post by:
Hi, I need to setup an ODBC link over our Internet connection between MS Access (local) and a MySQL server (Remote - the local PC has the MySQL ODBC driver installed). What kind of bandwidth...
13
by: Eric E | last post by:
Two questions regarding ODBC. 1) I am connecting to a MySQL database using the following code: Function LoginToMySQL(sUsername As String, sPW As String) As Boolean Dim dbMySQL As Database Dim...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
0
by: Emanuele | last post by:
I have write a program using MS Visual studio C++ 7.0 (platform Windows XP professional). I'm not using .NET. This program save data in a SQL server 2000 database using ADO. Everything works...
11
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.