PC Review


Reply
Thread Tools Rate Thread

Cannot connect to local SQLServer2000 database

 
 
Paul Robinson
Guest
Posts: n/a
 
      12th Dec 2005
Hi,

I am having problems connecting to a local SQLServer2000 database using
ADO.NET. I am using a 3rd party assembly which I have no control over, and
the database connection string is hardcoded into the application (nice).
The connection string looks like this:

"UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=local"

I do have the database setup on the local machine, but when trying to
connect I get the error:

"SQL Server does not exist or access is denied"

Now, I have tried to connect to the database using Query Analyser and it
will not connect to a server called "local" but it WILL connect to a server
called "(local)".

Because I can't change the connection string I need to get it connected
using "local". It works on one machine but not the test machine I have. As
far as I can tell everything is set up the same.

I have tried setting up various aliases for "local" using the SQL Server
Client Network Utility, but still having no success. I have set up a named
pipe and also a TCP/IP alias for "local" but I still can't get the
connection to work.

Can anyone help with this?

Thanks!


 
Reply With Quote
 
 
 
 
MC
Guest
Posts: n/a
 
      12th Dec 2005
try Data Source=.
ie replace local with a full stop

"Paul Robinson" <(E-Mail Removed)> wrote in message
news:OkU8X0y$(E-Mail Removed)...
> Hi,
>
> I am having problems connecting to a local SQLServer2000 database using
> ADO.NET. I am using a 3rd party assembly which I have no control over,
> and
> the database connection string is hardcoded into the application (nice).
> The connection string looks like this:
>
> "UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=local"
>
> I do have the database setup on the local machine, but when trying to
> connect I get the error:
>
> "SQL Server does not exist or access is denied"
>
> Now, I have tried to connect to the database using Query Analyser and it
> will not connect to a server called "local" but it WILL connect to a
> server
> called "(local)".
>
> Because I can't change the connection string I need to get it connected
> using "local". It works on one machine but not the test machine I have.
> As
> far as I can tell everything is set up the same.
>
> I have tried setting up various aliases for "local" using the SQL Server
> Client Network Utility, but still having no success. I have set up a
> named
> pipe and also a TCP/IP alias for "local" but I still can't get the
> connection to work.
>
> Can anyone help with this?
>
> Thanks!
>
>



 
Reply With Quote
 
Paul Robinson
Guest
Posts: n/a
 
      12th Dec 2005
I cannot change the connection string - it's hardcoded!

"MC" <(E-Mail Removed)> wrote in message
news:OcPtxCz$(E-Mail Removed)...
> try Data Source=.
> ie replace local with a full stop
>
> "Paul Robinson" <(E-Mail Removed)> wrote in message
> news:OkU8X0y$(E-Mail Removed)...
> > Hi,
> >
> > I am having problems connecting to a local SQLServer2000 database using
> > ADO.NET. I am using a 3rd party assembly which I have no control over,
> > and
> > the database connection string is hardcoded into the application (nice).
> > The connection string looks like this:
> >
> > "UID=john;password=johnspassword;Initial Catalog=thedb;Data

Source=local"
> >
> > I do have the database setup on the local machine, but when trying to
> > connect I get the error:
> >
> > "SQL Server does not exist or access is denied"
> >
> > Now, I have tried to connect to the database using Query Analyser and it
> > will not connect to a server called "local" but it WILL connect to a
> > server
> > called "(local)".
> >
> > Because I can't change the connection string I need to get it connected
> > using "local". It works on one machine but not the test machine I have.
> > As
> > far as I can tell everything is set up the same.
> >
> > I have tried setting up various aliases for "local" using the SQL Server
> > Client Network Utility, but still having no success. I have set up a
> > named
> > pipe and also a TCP/IP alias for "local" but I still can't get the
> > connection to work.
> >
> > Can anyone help with this?
> >
> > Thanks!
> >
> >

>
>



 
Reply With Quote
 
Marina
Guest
Posts: n/a
 
      12th Dec 2005
You should call the support line for the 3rd party product. They either need
to walk you through it, or they need to realize that it is ludicrous to hard
code a connection string anywhere, and change their component. Or better
yet, find a way to not have to use their product so you don't have to waste
your time dealing with things you shouldn't have to be.

"Paul Robinson" <(E-Mail Removed)> wrote in message
news:%23xTEPFz$(E-Mail Removed)...
>I cannot change the connection string - it's hardcoded!
>
> "MC" <(E-Mail Removed)> wrote in message
> news:OcPtxCz$(E-Mail Removed)...
>> try Data Source=.
>> ie replace local with a full stop
>>
>> "Paul Robinson" <(E-Mail Removed)> wrote in message
>> news:OkU8X0y$(E-Mail Removed)...
>> > Hi,
>> >
>> > I am having problems connecting to a local SQLServer2000 database using
>> > ADO.NET. I am using a 3rd party assembly which I have no control over,
>> > and
>> > the database connection string is hardcoded into the application
>> > (nice).
>> > The connection string looks like this:
>> >
>> > "UID=john;password=johnspassword;Initial Catalog=thedb;Data

> Source=local"
>> >
>> > I do have the database setup on the local machine, but when trying to
>> > connect I get the error:
>> >
>> > "SQL Server does not exist or access is denied"
>> >
>> > Now, I have tried to connect to the database using Query Analyser and
>> > it
>> > will not connect to a server called "local" but it WILL connect to a
>> > server
>> > called "(local)".
>> >
>> > Because I can't change the connection string I need to get it connected
>> > using "local". It works on one machine but not the test machine I
>> > have.
>> > As
>> > far as I can tell everything is set up the same.
>> >
>> > I have tried setting up various aliases for "local" using the SQL
>> > Server
>> > Client Network Utility, but still having no success. I have set up a
>> > named
>> > pipe and also a TCP/IP alias for "local" but I still can't get the
>> > connection to work.
>> >
>> > Can anyone help with this?
>> >
>> > Thanks!
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      12th Dec 2005
Paul,

Did you try to change the machinename and than the server name to "local"

Just a try

Cor

"Paul Robinson" <(E-Mail Removed)>

> Hi,
>
> I am having problems connecting to a local SQLServer2000 database using
> ADO.NET. I am using a 3rd party assembly which I have no control over,
> and
> the database connection string is hardcoded into the application (nice).
> The connection string looks like this:
>
> "UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=local"
>
> I do have the database setup on the local machine, but when trying to
> connect I get the error:
>
> "SQL Server does not exist or access is denied"
>
> Now, I have tried to connect to the database using Query Analyser and it
> will not connect to a server called "local" but it WILL connect to a
> server
> called "(local)".
>
> Because I can't change the connection string I need to get it connected
> using "local". It works on one machine but not the test machine I have.
> As
> far as I can tell everything is set up the same.
>
> I have tried setting up various aliases for "local" using the SQL Server
> Client Network Utility, but still having no success. I have set up a
> named
> pipe and also a TCP/IP alias for "local" but I still can't get the
> connection to work.
>
> Can anyone help with this?
>
> Thanks!
>
>



 
Reply With Quote
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      12th Dec 2005
Or maybe creating an alias with the name « local » (using the Network
Client Utility of SQL-Server 2000, not sure of the translation of the name
here) ?

The real shortcut for the local machine is (local) and not local; so maybe
creating an alias will do the trick.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Cor Ligthert [MVP]" <(E-Mail Removed)> wrote in message
news:%2395xmsz$(E-Mail Removed)...
> Paul,
>
> Did you try to change the machinename and than the server name to "local"
>
> Just a try
>
> Cor
>
> "Paul Robinson" <(E-Mail Removed)>
>
>> Hi,
>>
>> I am having problems connecting to a local SQLServer2000 database using
>> ADO.NET. I am using a 3rd party assembly which I have no control over,
>> and
>> the database connection string is hardcoded into the application (nice).
>> The connection string looks like this:
>>
>> "UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=local"
>>
>> I do have the database setup on the local machine, but when trying to
>> connect I get the error:
>>
>> "SQL Server does not exist or access is denied"
>>
>> Now, I have tried to connect to the database using Query Analyser and it
>> will not connect to a server called "local" but it WILL connect to a
>> server
>> called "(local)".
>>
>> Because I can't change the connection string I need to get it connected
>> using "local". It works on one machine but not the test machine I have.
>> As
>> far as I can tell everything is set up the same.
>>
>> I have tried setting up various aliases for "local" using the SQL Server
>> Client Network Utility, but still having no success. I have set up a
>> named
>> pipe and also a TCP/IP alias for "local" but I still can't get the
>> connection to work.
>>
>> Can anyone help with this?
>>
>> Thanks!
>>
>>

>
>



 
Reply With Quote
 
Paul Robinson
Guest
Posts: n/a
 
      13th Dec 2005
Thanks for the replies. I tried creating aliases (both a TCP/IP one and
also a named pipe one) but that didn't help.

"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:%23Ux1w$z$(E-Mail Removed)...
> Or maybe creating an alias with the name « local » (using the Network
> Client Utility of SQL-Server 2000, not sure of the translation of the name
> here) ?
>
> The real shortcut for the local machine is (local) and not local; so maybe
> creating an alias will do the trick.
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
> E-mail: http://cerbermail.com/?QugbLEWINF
>
>
> "Cor Ligthert [MVP]" <(E-Mail Removed)> wrote in message
> news:%2395xmsz$(E-Mail Removed)...
> > Paul,
> >
> > Did you try to change the machinename and than the server name to

"local"
> >
> > Just a try
> >
> > Cor
> >
> > "Paul Robinson" <(E-Mail Removed)>
> >
> >> Hi,
> >>
> >> I am having problems connecting to a local SQLServer2000 database using
> >> ADO.NET. I am using a 3rd party assembly which I have no control over,
> >> and
> >> the database connection string is hardcoded into the application

(nice).
> >> The connection string looks like this:
> >>
> >> "UID=john;password=johnspassword;Initial Catalog=thedb;Data

Source=local"
> >>
> >> I do have the database setup on the local machine, but when trying to
> >> connect I get the error:
> >>
> >> "SQL Server does not exist or access is denied"
> >>
> >> Now, I have tried to connect to the database using Query Analyser and

it
> >> will not connect to a server called "local" but it WILL connect to a
> >> server
> >> called "(local)".
> >>
> >> Because I can't change the connection string I need to get it connected
> >> using "local". It works on one machine but not the test machine I

have.
> >> As
> >> far as I can tell everything is set up the same.
> >>
> >> I have tried setting up various aliases for "local" using the SQL

Server
> >> Client Network Utility, but still having no success. I have set up a
> >> named
> >> pipe and also a TCP/IP alias for "local" but I still can't get the
> >> connection to work.
> >>
> >> Can anyone help with this?
> >>
> >> Thanks!
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      13th Dec 2005
Hum, just to be sure: the connection string is really:

"UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=local"

and not:

"UID=john;password=johnspassword;Initial Catalog=thedb;Data Source=(local)"
?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Paul Robinson" <(E-Mail Removed)> wrote in message
news:uzEaT3%23$(E-Mail Removed)...
> Thanks for the replies. I tried creating aliases (both a TCP/IP one and
> also a named pipe one) but that didn't help.
>
> "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
> wrote in message news:%23Ux1w$z$(E-Mail Removed)...
>> Or maybe creating an alias with the name « local » (using the Network
>> Client Utility of SQL-Server 2000, not sure of the translation of the
>> name
>> here) ?
>>
>> The real shortcut for the local machine is (local) and not local; so
>> maybe
>> creating an alias will do the trick.
>>
>> --
>> Sylvain Lafontaine, ing.
>> MVP - Technologies Virtual-PC
>> E-mail: http://cerbermail.com/?QugbLEWINF
>>
>>
>> "Cor Ligthert [MVP]" <(E-Mail Removed)> wrote in message
>> news:%2395xmsz$(E-Mail Removed)...
>> > Paul,
>> >
>> > Did you try to change the machinename and than the server name to

> "local"
>> >
>> > Just a try
>> >
>> > Cor
>> >
>> > "Paul Robinson" <(E-Mail Removed)>
>> >
>> >> Hi,
>> >>
>> >> I am having problems connecting to a local SQLServer2000 database
>> >> using
>> >> ADO.NET. I am using a 3rd party assembly which I have no control
>> >> over,
>> >> and
>> >> the database connection string is hardcoded into the application

> (nice).
>> >> The connection string looks like this:
>> >>
>> >> "UID=john;password=johnspassword;Initial Catalog=thedb;Data

> Source=local"
>> >>
>> >> I do have the database setup on the local machine, but when trying to
>> >> connect I get the error:
>> >>
>> >> "SQL Server does not exist or access is denied"
>> >>
>> >> Now, I have tried to connect to the database using Query Analyser and

> it
>> >> will not connect to a server called "local" but it WILL connect to a
>> >> server
>> >> called "(local)".
>> >>
>> >> Because I can't change the connection string I need to get it
>> >> connected
>> >> using "local". It works on one machine but not the test machine I

> have.
>> >> As
>> >> far as I can tell everything is set up the same.
>> >>
>> >> I have tried setting up various aliases for "local" using the SQL

> Server
>> >> Client Network Utility, but still having no success. I have set up a
>> >> named
>> >> pipe and also a TCP/IP alias for "local" but I still can't get the
>> >> connection to work.
>> >>
>> >> Can anyone help with this?
>> >>
>> >> Thanks!
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error trying to connect to local database - What is going on? Alan Silver Microsoft ASP .NET 5 26th Jul 2007 11:27 PM
Unable to connect to local SQL 2005 Database =?Utf-8?B?UGhpbA==?= Microsoft Outlook BCM 1 26th Apr 2007 09:08 PM
I want to migrate access database to sqlserver2000 =?Utf-8?B?UGhpbGlwcw==?= Microsoft Access 1 20th Sep 2006 05:54 PM
Connect to SqlServer2000 from the emulator Zanna Microsoft Dot NET Compact Framework 6 13th Jun 2005 10:55 PM
I can not connect SqlServer2000 with PocketPC with WIFI =?Utf-8?B?RmxhdHRyb24=?= Microsoft Dot NET Compact Framework 3 23rd Aug 2004 11:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 AM.