Ok guys I have racked my brain on this one.
I have a vb .net service installed on a win2k server. I am trying to
get it to connect to sql 2000 box but I get this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
I have remote connection turned on, on the sql2000. I have tried the
following connection strings
data source=<IP>;ini tial catalog=dfcdb;p ersist security info=False;user
id=user;passwor d=PW;packet size=4096
data source=(local); initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=tcp:<IP> ;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=<IP>:143 3;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096 (that port is
open)
The service is set to run under my log on.
I made a windows app that tests connection strings and the first 3
work. I tested the service on a local machine with a local sql 2000 and
it works like a champ.
Here is the .net code to open the connection
'1. Create a connection
Dim SQLString As String = My.Settings.SQL ConnectionStrin g
Dim cn As New SqlConnection(S QLString)
cn.Open() <-- I think it breaks here
'2. Create the command object, passing in the SQL string
Const selectString As String = "GetRules"
Dim cmd As SqlCommand
cmd = New SqlCommand(sele ctString, cn)
cmd.CommandType = CommandType.Sto redProcedure
Dim reader As SqlDataReader = cmd.ExecuteRead er()
please help I have looked everywhere 10 2368
Have you made sure that the connection can get through your firewall?
<bl*********@gm ail.comwrote in message
news:11******** *************@3 8g2000cwa.googl egroups.com...
Ok guys I have racked my brain on this one.
I have a vb .net service installed on a win2k server. I am trying to
get it to connect to sql 2000 box but I get this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
I have remote connection turned on, on the sql2000. I have tried the
following connection strings
data source=<IP>;ini tial catalog=dfcdb;p ersist security info=False;user
id=user;passwor d=PW;packet size=4096
data source=(local); initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=tcp:<IP> ;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=<IP>:143 3;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096 (that port is
open)
The service is set to run under my log on.
I made a windows app that tests connection strings and the first 3
work. I tested the service on a local machine with a local sql 2000 and
it works like a champ.
Here is the .net code to open the connection
'1. Create a connection
Dim SQLString As String = My.Settings.SQL ConnectionStrin g
Dim cn As New SqlConnection(S QLString)
cn.Open() <-- I think it breaks here
'2. Create the command object, passing in the SQL string
Const selectString As String = "GetRules"
Dim cmd As SqlCommand
cmd = New SqlCommand(sele ctString, cn)
cmd.CommandType = CommandType.Sto redProcedure
Dim reader As SqlDataReader = cmd.ExecuteRead er()
please help I have looked everywhere
To be honest I really don't know much about firewalls and I think that
might be the problem. What would I need to set on it for it to work?
Matt Fielder wrote:
Have you made sure that the connection can get through your firewall?
<bl*********@gm ail.comwrote in message
news:11******** *************@3 8g2000cwa.googl egroups.com...
Ok guys I have racked my brain on this one.
I have a vb .net service installed on a win2k server. I am trying to
get it to connect to sql 2000 box but I get this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
I have remote connection turned on, on the sql2000. I have tried the
following connection strings
data source=<IP>;ini tial catalog=dfcdb;p ersist security info=False;user
id=user;passwor d=PW;packet size=4096
data source=(local); initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=tcp:<IP> ;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=<IP>:143 3;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096 (that port is
open)
The service is set to run under my log on.
I made a windows app that tests connection strings and the first 3
work. I tested the service on a local machine with a local sql 2000 and
it works like a champ.
Here is the .net code to open the connection
'1. Create a connection
Dim SQLString As String = My.Settings.SQL ConnectionStrin g
Dim cn As New SqlConnection(S QLString)
cn.Open() <-- I think it breaks here
'2. Create the command object, passing in the SQL string
Const selectString As String = "GetRules"
Dim cmd As SqlCommand
cmd = New SqlCommand(sele ctString, cn)
cmd.CommandType = CommandType.Sto redProcedure
Dim reader As SqlDataReader = cmd.ExecuteRead er()
please help I have looked everywhere
Just as a test to see if that is in fact the issue, just disable the
firewall entirely for a test - then re-enable. Once you've figured out if
that is the issue, you can do a little more research about how to allow just
the needed access through. Others know much more about this type of
security than I, so I don't want to potentially give dangerous advice.
For the quick test, if your running the firewall built into XP, you can get
to it via control panel.
"blurryimag e" <bl*********@gm ail.comwrote in message
news:11******** **************@ m30g2000cwm.goo glegroups.com.. .
To be honest I really don't know much about firewalls and I think that
might be the problem. What would I need to set on it for it to work?
Matt Fielder wrote:
>Have you made sure that the connection can get through your firewall? <bl*********@g mail.comwrote in message news:11******* **************@ 38g2000cwa.goog legroups.com...
Ok guys I have racked my brain on this one.
I have a vb .net service installed on a win2k server. I am trying to
get it to connect to sql 2000 box but I get this error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
I have remote connection turned on, on the sql2000. I have tried the
following connection strings
data source=<IP>;ini tial catalog=dfcdb;p ersist security info=False;user
id=user;passwor d=PW;packet size=4096
data source=(local); initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=tcp:<IP> ;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096
data source=<IP>:143 3;initial catalog=dfcdb;p ersist security
info=False;user id=user;passwor d=PW;packet size=4096 (that port is
open)
The service is set to run under my log on.
I made a windows app that tests connection strings and the first 3
work. I tested the service on a local machine with a local sql 2000 and
it works like a champ.
Here is the .net code to open the connection
'1. Create a connection
Dim SQLString As String = My.Settings.SQL ConnectionStrin g
Dim cn As New SqlConnection(S QLString)
cn.Open() <-- I think it breaks here
'2. Create the command object, passing in the SQL string
Const selectString As String = "GetRules"
Dim cmd As SqlCommand
cmd = New SqlCommand(sele ctString, cn)
cmd.CommandType = CommandType.Sto redProcedure
Dim reader As SqlDataReader = cmd.ExecuteRead er()
please help I have looked everywhere
I just looked at the server and no firewall is running on it.
Can you connect to the server from teh remote machine through either the
Server Explorer in VS or SQL Enterprise Manager?
"blurryimag e" <bl*********@gm ail.comwrote in message
news:11******** *************@i 39g2000hsf.goog legroups.com...
>I just looked at the server and no firewall is running on it.
I just ran another test and it does not make sense. I ran the service
from an outside the network machine using the public IP of the SQL
server and it runs fine. I dont understand why a pc not on the network
can connect but a service on the same machine cannt connect.
I am using internal IP in connection string for the locally ran service
and the external public IP for the service being ran outside the
network.
I dont have VS installed on the server to test its connection but I can
publish to it from VS on an external machine
A few things to look at:
Are you able to ping the IP address that you're using in your connection
string?
If unable to connect when running on local machine, try changing the IP in
your connection string to 127.0.0.1.
Also try changing datasource in connect string to "localhost"
I suspect that the local IP address your attempting to connect to may not be
correct. I'd double check that as well.
"blurryimag e" <bl*********@gm ail.comwrote in message
news:11******** **************@ i56g2000hsf.goo glegroups.com.. .
>I just ran another test and it does not make sense. I ran the service
from an outside the network machine using the public IP of the SQL
server and it runs fine. I dont understand why a pc not on the network
can connect but a service on the same machine cannt connect.
I am using internal IP in connection string for the locally ran service
and the external public IP for the service being ran outside the
network.
I dont have VS installed on the server to test its connection but I can
publish to it from VS on an external machine
Thank you for your help on this.
I tried 127.0.0.1 and local and localhost with no luck. I also did an
ipconfig just to make sure it is the right address and it is.
I have a windows app that I made to test SQL connection strings It just
tells if the connection was made returning True or False. This program
(running as a windows app) works so I know the connection strings are
good. I run into the connection problem only when it is a windows
service.
I hate to say it but I'm running out of ideas. There is always the "call
microsoft" option - although probably a costly one. I did google and ran
accross a few issues that people have had, but most seem to be resolved via
SQL service packs. If I think of anything else, I'll post back. I'm also
watching this thread because now I'm both curious and stumped. Please post
the solution if you find one. Sorry I couldn't be more help -- good luck!!!
"blurryimag e" <bl*********@gm ail.comwrote in message
news:11******** **************@ k58g2000hse.goo glegroups.com.. .
Thank you for your help on this.
I tried 127.0.0.1 and local and localhost with no luck. I also did an
ipconfig just to make sure it is the right address and it is.
I have a windows app that I made to test SQL connection strings It just
tells if the connection was made returning True or False. This program
(running as a windows app) works so I know the connection strings are
good. I run into the connection problem only when it is a windows
service. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jack Smith |
last post by:
Hello,
I have PHP 4.3.1.1 running on Windows 2000 Server with IIS 5. This
connects to an MS SQL 7 server running on a seperate NT4 box.
Recently, this SQL7 Server had SQL7 Service Pack 4 applied to it.
After this Service Pack, the PHP apps could no longer connect to the
database.
Warning: mssql_connect() : Unable to connect
to server: <mySQLServer> in <myPHPapp.php> on line 12.
|
by: Subodh |
last post by:
Hi,
I changed the login for MSSQLSERVER service for 6.5 box to "This
account" from "system account" and then again changed back to "system
account". Now I cann't connect thru Enterprize Manager to my server.
All my services r running and I can connect to my database thru an
application as before. I cannot re-boot the machine as it is in
production. Any thoughts?
Thanks in advance.
|
by: Jay Chan |
last post by:
We have just installed a SQL Server 2000 (SP 3A) onto a computer that
has Windows-2003 Server on it. Now, we cannot get access to that
database server from other computers. Seem like this may be an issue
with Active Directory.
Our network consists of Windows-2000 Servers (SP 4) and Windows-2000
workstations and Windows-XP workstations. We also have SQL Server 2000
(SP2) in three Windows-2000 servers. All work fine. Recently, we get a...
|
by: Steve Lutz |
last post by:
Hi All,
I have a Windows Service that runs well. The service hosts a remote object.
The purpose of the object is so that I can "peak" into the service to see
what it's doing. I wrote a small Windows Application that connects to the
remote object and prints out status information.
Everything works fine when I first start the service. However, after some
period, when I attempt to connect to the remote object, I get "Requested
Service not...
|
by: Scott McChesney |
last post by:
Folks -
We are running around and around here on a project we're developing, and I'm
getting to the point that I don't know what I do and don't know. So I need
some assistance.
We are developing a web service that connects to an external LDAP server to
validate a username/password that the user enters from a login page. Right
now, we're concerned about interaction with an ASP.NET website, but this web
service will also be used by...
| |
by: Richard |
last post by:
I have created a Windows service which performs various functions
including setting variables in other application objects.
When the service runs under Local System account the functionality all
works OK, however when service runs under a user account it produces
exception errors when trying to set variables in the application
objects.
I created a .exe test harness which does the same and works OK when
run by the same user.
|
by: amirmira |
last post by:
I have a Windows Service developed in VB.NET that attempts to connect to a
database as soon as the service starts. I have no problem when I start the
service manually - but when I restart the computer that hosts the service, I
get a Null Reference Exception when I try to connect to the database (I have
set the service to start automatically). Any ideas why this is happening?
Thanks in advance.
Ajay Mirmira
|
by: Manfred Braun |
last post by:
Hello All!
I am writing a management application, which has to access remote machines
registry via System.Diagnostics.EventLog.CreateEventSource .
For each machine, I connect to, I create a DirectoryEntry and connect to
that machine specifying credentials. That's becauase the running user does
not has the right permissions .
The application is written in C# and the action taken is done with threads
from the threadpool.
|
by: bitchanger |
last post by:
I have installed an SQL Server 2000 Developer Edition (SP4) on a
computer that has Windows Server 2003 on it.The server is connected to
the workgroup "WORK" and has no Active Directory. Now I cannot connect
to that database server from other computers in the network. On the
server itself, I can registrate the instance from the own SQL Server
2000 and also an instance from an other SQL Server 2000 installation on
a Windows 2000 Server in...
|
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...
|
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...
| |
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |