Hi !
We are using Windows XP,
ADO in our application,
MS SQL Server 2000.
(Programming language: Delphi 5;
ADO components: from Adonis;
The computer is a SONY notebook).
SQL server is running on the same machine as the application.
The application has worked in many, many cases under W2K and even XP.
But on that computer it doesn't work:
When there is no network connection, then the application CANNOT connect to
our DB.
On the other hand, Enterprise Manager CAN connect.
When we plug in the network and restart the computer, then the application
CAN connect.
However, SQL Server is running locally !
The connection string for connecting our app to the database is something
like:
'Provider=SQLOLEDB.1; Password="";Persist Security Info=True;User
ID=Bis;Initial Catalog=BIS;Data Source=127.0.0.1'
How can we fix that problem ?
Is this a problem of MS SQL Server administration ?
Your kind help would be appreciated.
PeterThe soluition is to use named pipes to connect as
Enterprise manager will if IP: 127.0.0.1 cannot connect.
Change your connection string to :
'Provider=SQLOLEDB.1; Password="";Persist Security
Info=True;User
ID=Bis;Initial Catalog=BIS;Data Source=(local)'
This should fix the problem.
>--Original Message--
>Hi !
>We are using Windows XP,
>ADO in our application,
>MS SQL Server 2000.
>(Programming language: Delphi 5;
> ADO components: from Adonis;
> The computer is a SONY notebook).
>SQL server is running on the same machine as the
application.
>The application has worked in many, many cases under W2K
and even XP.
>But on that computer it doesn't work:
>When there is no network connection, then the application
CANNOT connect to
>our DB.
>On the other hand, Enterprise Manager CAN connect.
>When we plug in the network and restart the computer,
then the application
>CAN connect.
>However, SQL Server is running locally !
>The connection string for connecting our app to the
database is something
>like:
> 'Provider=SQLOLEDB.1; Password="";Persist Security
Info=True;User
>ID=Bis;Initial Catalog=BIS;Data Source=127.0.0.1'
>How can we fix that problem ?
>Is this a problem of MS SQL Server administration ?
>Your kind help would be appreciated.
>Peter
>
>.
>|||> Change your connection string to :
> 'Provider=SQLOLEDB.1; Password="";Persist Security
> Info=True;User
> ID=Bis;Initial Catalog=BIS;Data Source=(local)'
It worked.
Thanks a lot !
Friday, March 23, 2012
No connection to local SQL Server when no network connection
Labels:
ado,
adonis,
application,
components,
computer,
connection,
database,
delphi,
language,
local,
microsoft,
mysql,
network,
oracle,
programming,
server,
sql,
windows
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment