473,385 Members | 1,400 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,385 software developers and data experts.

Connection String question

I am using SQL MSDE edition due to financial reasons (it's free). I have a
question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have to
use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue but
it is kind of annoying me and I would like to know why it is.

Thanks
Nov 20 '05 #1
4 1373

"William" <no**@none.com> wrote in message
news:3f***********@bignews4.bellsouth.net...
I am using SQL MSDE edition due to financial reasons (it's free). I have a question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have to
use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue but it is kind of annoying me and I would like to know why it is.


You may have network protocols disabled for your MSDE installation (that's
the default). As such, localhost will fail because that will be turned into
an IP address and a TCP/IP connection to MSDE will be attempted. (local), on
the other hand, uses named pipes, I believe.

I could be wrong. You'd probably be better off asking in
microsoft.public.sqlserver.msde.
Nov 20 '05 #2
I think I ran into this issue when I did a clean install of MSDE with SP3a.
SP3a disables some network stuff by default (it does not do this during an
upgrade).

I think this deals with subject from the SP3a readme:

3.7.2 Security Considerations for MSDE 2000 SP3a
The following information applies only to Desktop Engine (MSDE 2000).

The behavior of MSDE 2000 setup has been changed in SP3a so that the default
settings result in a more secure configuration.

Desktop Engine SP3a changes the default behavior of the
DISABLENETWORKPROTOCOLS setup parameter that specifies the configuration of
the network connection support for an instance of MSDE 2000. If no
application running on another computer will connect to your instance of
MSDE 2000, the instance has no need for network support and it is prudent to
turn off a resource that is not being used. SP3a will turn off the network
support by default when installing new instances of MSDE 2000. If you
disable the network support when installing an instance of MSDE 2000 SP3a,
you can later reconfigure the instance to enable the support. For more
information about disabling and restoring network access, see Microsoft
Knowledge Base article 814130.
Not sure how that all relates (if at all), but I now just use (local) and
not localhost for everything. It seems to be less problematic for me.

Greg

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...

"William" <no**@none.com> wrote in message
news:3f***********@bignews4.bellsouth.net...
I am using SQL MSDE edition due to financial reasons (it's free). I have
a
question regarding connection strings. Almost every publication, online
example or website uses some version of the following connection string:

data source=localhost;initial catalog=pubs;user id=sa

and it seems to work for them. However, in my particular setup I have
to use either the server name or '(local)' including the parenthesis. Any
deviation returns a cannot find server error. This is not a huge issue

but
it is kind of annoying me and I would like to know why it is.


You may have network protocols disabled for your MSDE installation (that's
the default). As such, localhost will fail because that will be turned

into an IP address and a TCP/IP connection to MSDE will be attempted. (local), on the other hand, uses named pipes, I believe.

I could be wrong. You'd probably be better off asking in
microsoft.public.sqlserver.msde.

Nov 20 '05 #3

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:OY**************@TK2MSFTNGP10.phx.gbl...
I think I ran into this issue when I did a clean install of MSDE with SP3a. SP3a disables some network stuff by default (it does not do this during an
upgrade).


You're right. 99% of the MSDE installs I've done have been clean installs
and SP3a. I forgot that this was not always the behavior.
Nov 20 '05 #4
On Wed, 28 Jul 2004 09:55:05 -0400, "William" <no**@none.com> wrote:

¤ I am using SQL MSDE edition due to financial reasons (it's free). I have a
¤ question regarding connection strings. Almost every publication, online
¤ example or website uses some version of the following connection string:
¤
¤ data source=localhost;initial catalog=pubs;user id=sa
¤
¤ and it seems to work for them. However, in my particular setup I have to
¤ use either the server name or '(local)' including the parenthesis. Any
¤ deviation returns a cannot find server error. This is not a huge issue but
¤ it is kind of annoying me and I would like to know why it is.

Never used localhost unless if was for a local web server address. The (local) data source should be
appropriate.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #5

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

Similar topics

0
by: JWM | last post by:
I am trying to implement Oracle connection pooling for the following code, which was written by someone else. Here is my main question -- this java file creates code that is executed every hour,...
5
by: Fred Zuckerman | last post by:
Hello All, After reading in this group about the preference for connecting to a SQL Server using a connection string instead of a DSN file, I have done just that. BUT, I cannot update my data....
2
by: Art | last post by:
Hi, I'm working with a Microsoft Access Database in VB.net. I can open a connection in my code as follows: mConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & Data Source=" & dbString dbConn...
3
by: John | last post by:
Hi I have a dataset from a web service. I want to use a dataadapter with the dataset. What connection string should I use so the da knows that it is acting on the remote db associated with the...
9
by: nbs.tag | last post by:
hey guys heres my question. I was told by a little birdie that .net 2.0 has the ability to read a connection string directly from a registry key. so in the registry key a string value of say :...
1
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
7
by: Bill Nguyen | last post by:
I have this connection string using ODBC DSN Dim FactorJaco As String = "dsn=jaco;catalog=factor;uid=user;pwd=passord" This requires an ODBC DSN (jaco) at every client PC. I need to use DSN-less...
13
by: Jennifer.Berube | last post by:
well I'm not sure how to go about making my SQL connection string... The code below is what I need to replace with my SQL connection...I just don't know if that code is for DSN or access... I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...

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.