Re: REWARD: Fix our SQL Server connection for $150 (CAPA)

From: Ken Cox [Microsoft MVP] (BANSPAMken_cox@sympatico.ca)
Date: 09/06/02


From: "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca>
Date: Fri, 6 Sep 2002 14:17:01 -0400


Check the syntax of your connection string for the managed SQL provider.
Examples here:

http://www.able-consulting.com/ADO_Conn.htm#SQLClientManagedProvider

"Rob Cote" <rgcote@alum.mit.edu> wrote in message
news:aR4e9.161239$kp.766257@rwcrnsc52.ops.asp.att.net...

We have wrestled with this problem long enough. If you are an expert at
connecting to SQL Server 2000 from an ASP.NET application, then I will pay
you $150 to make this work for our application. We will give you access to
our server machine via a VPN and allow you to debug it. If it takes you 5
minutes, you made great money. If it takes an hour, you've still made good
money.

We are very anxious to get this resolved. Please contact me by phone or
email ASAP (see info at the end of the message).

Here's the problem: We can connect to SQL Server 2000 just fine in our
development set up. We cannot do so in our production set up provided by the
client.

Here's a summary of the environments:

Development environment:
    Workstation is running Visual Studio .NET and Windows 2000 Professional
    Server is running SQL Server 2000 and Windows 2000 Server
    These two machines are connected on a simple LAN

Production environment:
    Single machine is running Visual Studio .NET, SQL Server 2000 and
Windows 2000 Server

The code below shows the connection string we are using for the development
environment and the connection string we are using for the production
environment. In the production environment, the connection will not work. It
gives back some generic error about the connection failing.

Here's what we are doing:

'***************************************************************************
*****
Imports System.Data
Imports System.Data.SqlClient

Public Class CAPADatabase

    ' DEVELOPMENT DESKTOP USE
    'Dim strDBConnectString As String = "server=CONSULTING\CONSULTING_SQL;"
& _
    ' "database=CAPASQL;" & _
    ' "user ID=DB_USER;" & _
    ' "pwd=db_user;"

    ' LIVE SYSTEM USE
    Dim strDBConnectString As String = "server=MCDMSPADMIN01\MCDMSPADMIN01;"
& _
                                       "database=CAPASQL;" & _
                                       "user ID=DB_USER;" & _
                                       "pwd=db_user;"

    Dim dbConnection As New SqlConnection(strDBConnectString)

    Public Sub Open()
        dbConnection.Open()
    End Sub

    Public Sub Close()
        dbConnection.Close()
    End Sub

End Class
'***************************************************************************
*****

- Rob Cote
  Director, Consulting Services
  Hands On Technology Transfer, Inc.
  (781) 272-4757
  robc@traininghott.com



Relevant Pages

  • Re: SQL Resets
    ... If it were SQL that was falling short, ... The default backlog for SQL Server is 5. ... System.InvalidOperationException: Internal connection fatal error. ... From time to time, under heavy loads, we are getting resets at ...
    (microsoft.public.sqlserver.connect)
  • Re: provider: Named Pipes Provider, error: 40 - Could not open a c
    ... I have tried connecting to Sql Management Studio and it worked pretty much ... An error has occurred while establishing a connection to the server. ... under the default settings SQL Server does not allow remote connections. ... I have a sql server install / database on the web server. ...
    (microsoft.public.sqlserver.connect)
  • RE: Logging in in background
    ... wold take all kinds of modifictions as I'd need to be checking that each SQL ... my database and all have connection strings associated with them. ... I suspect that there is also an issue on the SQL Server side as I keep ...
    (microsoft.public.access.modulesdaovba)
  • .Net framework error
    ... Unfortunately the information is very limited and usually the report just ... The application is a front end for a SQL Server 2005 Express database, ... connection string in the app config file. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: connect to named instance w/ non-default port
    ... SQL Native Client Configuration. ... An error has occurred while establishing a connection to the server. ... under the default settings SQL Server does not allow remote connections. ...
    (microsoft.public.sqlserver.connect)

Quantcast