473,671 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2814
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.publi c.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
6764
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 the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
8
3481
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 Configuration Assistant and registered the SAMPLE and my TEST databases with the ODBC Administrator as System DSN data sources. Everything seems fine, but when I try to connect to "External Tables" through 123 my DB2 databases are not listed under available...
4
10810
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 different from the name of the database. For instance if my database name is SAMPLE i want to create a dsn with name sample_database. Please let me know if there is a way to do this from the command line. As far as I can see db2 catalog command...
5
6181
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 from the cli is for all intents practicaly instantaneous. After much research I discovered that PHP by default uses a dynamic cursor type which can be quite a bit slower than a forward only cursor. BTW I have been searching forward only/read...
8
3543
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 requirements am I looking at? Will it function over a 64k leased line? If this would be slow, could there be any major impact on other uses such as web and email? Regards,
13
8268
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 cnMySQL As DAO.Connection Dim sDSN As String sDSN = "ODBC;DRIVER={MySQL ODBC 3.51 Driver};" _ & "SERVER=127.0.0.1;" _
8
9628
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 work from
0
2200
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 correctly, yet if i stop the sql service and then restart it, while the programs write records, the reconnection to the server dont't work. When the service stops i catch all the exceptions. I want try to reconnect to the database continually till...
11
16311
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. We have been using oracle client 10.1.0.2 with it's odbc for a while without problem. The problem arose when we decided to reconnect all the tables and save password. Some query became suddenly very slow. Then I've discovered that the tables...
0
8481
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8400
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8823
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8602
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8672
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6234
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.