Solved

SQLExpresss losing connection to VB6 application

Posted on 2007-04-03
2
258 Views
Last Modified: 2010-03-19
I have a VB6 application that has MSDE as its current backend. In testing moving to SLSQLExpress I've noticed, since this application is run on laptops, that if I disconnect a connected network cable while I'm in the VB6 app I lose "connection" to the local database. If I end task on the app and restart it it works fine. If I reconnect the network cable while the app is running and then disconnect it the app runs fine. Also this happens when I'm connected to a wireless network and then disconnect and disable that connection.

In my template.ini file I have DISABLENETWORKPROTOCOLS=0. Is there a setting I'm missing? I can't seem to find anything else to set in the ini file.
0
Comment
Question by:KOCUBA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
jeepstyx22 earned 500 total points
ID: 18847416
If you are using TCP/IP then when you get disconnected from the network, bound protocols are dropped.  In the case of sql, port 1433, which would cause sql to disconnect.  
See http://support.microsoft.com/default.aspx?scid=kb;en-us;239924

Other option would be make sure that you are using localhost, or 127.0.0.1 as the host. see http://www.adras.com/Network-error.t17343-18.html
0
 

Author Comment

by:KOCUBA
ID: 18851332
Jeepstyx22,

Thanks for the response. The info in the first link worked great in real world, but not in VMWare. Not sure why but don't care.  Actaully am going the route of adding "server= localhost" to the connection string feel that it is safer and I don't have to worry about our support staff going into the registry when it is unnessecary.

Again thanks for the great answer(s).
Dave
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
vbModal 12 74
Email Notifications for SQL 2005 9 42
MS SQL Update query with connected table data 3 78
SQL Server for XML PATH giving wrong results. 6 59
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question