Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Monday, March 12, 2012

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
Pramod
With SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegrou ps.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>
|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:[vbcol=seagreen]
> With SQL Server2000 or older, the server name is "Compuername" or "(local)",
> (plus "\instanceName" if necessary). It is not "localhost", which is used to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegrou ps.com...

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
PramodWith SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:[vbcol=seagreen]
> With SQL Server2000 or older, the server name is "Compuername" or "(local)
",
> (plus "\instanceName" if necessary). It is not "localhost", which is used
to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
PramodWith SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:
> With SQL Server2000 or older, the server name is "Compuername" or "(local)",
> (plus "\instanceName" if necessary). It is not "localhost", which is used to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> > Hi,
> >
> > Do you know how ADO will behave based upon the servername that is
> > specified in the connection string of SQL Server 2000? When does it
> > work with localhost and when does it not? Is it documented that this is
> > the expected behavior?
> >
> > Thanks,
> > Regards,
> > Pramod
> >

localhost is not mapped to server name

Hi,
It is a long time that I have been using my box and have some .NET apps
running on it which use a connection string with Server=localhost and I have
not had any problem yet. Today I have updated my box Windows with recent
HotFixes (well I am not 100% sure it is the reason of this problem) and
after that my applications can not login database, and get this exception
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied".
When I changed server name from localhost to real server name they are
working properly.
Any advice is welcomed.
Thanks
Mike(local) instead of localhost
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"masoud bayan" <masoud_bayan@.hotmail.com> wrote in message
news:ujOrVWe7EHA.3644@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> It is a long time that I have been using my box and have some .NET apps
> running on it which use a connection string with Server=localhost and I
> have
> not had any problem yet. Today I have updated my box Windows with recent
> HotFixes (well I am not 100% sure it is the reason of this problem) and
> after that my applications can not login database, and get this exception
> "System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied".
> When I changed server name from localhost to real server name they are
> working properly.
>
> Any advice is welcomed.
>
> Thanks
> Mike
>
>

Friday, March 9, 2012

localhost is not mapped to server name

Hi,
It is a long time that I have been using my box and have some .NET apps
running on it which use a connection string with Server=localhost and I have
not had any problem yet. Today I have updated my box Windows with recent
HotFixes (well I am not 100% sure it is the reason of this problem) and
after that my applications can not login database, and get this exception
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied".
When I changed server name from localhost to real server name they are
working properly.
Any advice is welcomed.
Thanks
Mike
(local) instead of localhost
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"masoud bayan" <masoud_bayan@.hotmail.com> wrote in message
news:ujOrVWe7EHA.3644@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> It is a long time that I have been using my box and have some .NET apps
> running on it which use a connection string with Server=localhost and I
> have
> not had any problem yet. Today I have updated my box Windows with recent
> HotFixes (well I am not 100% sure it is the reason of this problem) and
> after that my applications can not login database, and get this exception
> "System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied".
> When I changed server name from localhost to real server name they are
> working properly.
>
> Any advice is welcomed.
>
> Thanks
> Mike
>
>

Wednesday, March 7, 2012

Local SQL connection String

How do I write a connection string in VB to use the local database. I have
something like this, but it does not work. I do not want to use the local
computer name. I want to make it generic so that the application can run on
any computer.
ThanksTry this:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False
Note there is no reference to a server so it uses the local server with
integrated security.
Bryce|||found the solution. I just have to use localhost.
Thanks
"Emma" wrote:

> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks|||Try,
-- WA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind;Integrated Security=SSPI"
...
-- MA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind; User ID=MyUsername; Password=MyPassword;"
...
AMB
"Emma" wrote:

> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks