PC Review


Reply
Thread Tools Rate Thread

Cant connect to SQL Server 2000 Developer edition

 
 
=?Utf-8?B?aGVtYW50?=
Guest
Posts: n/a
 
      24th Jan 2005
Hi,
I have been trying to connect SQL Server2000 developer edition using the
following string.

SqlConnection conn = new
SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");

I dont know where i am going wrong.

SQL Server Service Manager shows the following:
Server : Hemant
Services : SQL Server
Running \\Hemant -MSSQLServer

Even tried this command and numerous other combination but none seems to work.

SqlConnection conn = new
SqlConnection("server=Hemant;database=pubs;uid=sa;pwd=");

I want to establish connection using SqlConnection to the database pubs
using C# in .NET IDE.

Help me out. Where am i getting it wrong?? If someone else has answered
this question then provide me the link.







 
Reply With Quote
 
 
 
 
Marc Scheuner [MVP ADSI]
Guest
Posts: n/a
 
      24th Jan 2005
>SqlConnection conn = new
>SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");


Use "(local)" or "." for your local server.

server=(local);database=pubs; etc.
or
server=.;database=pubs; etc.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      24th Jan 2005
Create a Data Connection within Server Explorer, then drag&drop it on the
form.
It will create a SqlConnection with correct connection string for you.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

Drag&drop
"hemant" <(E-Mail Removed)> wrote in message
news:3800A4A4-28E2-45C8-944B-(E-Mail Removed)...
> Hi,
> I have been trying to connect SQL Server2000 developer edition using the
> following string.
>
> SqlConnection conn = new
> SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");
>
> I dont know where i am going wrong.
>
> SQL Server Service Manager shows the following:
> Server : Hemant
> Services : SQL Server
> Running \\Hemant -MSSQLServer
>
> Even tried this command and numerous other combination but none seems to
> work.
>
> SqlConnection conn = new
> SqlConnection("server=Hemant;database=pubs;uid=sa;pwd=");
>
> I want to establish connection using SqlConnection to the database pubs
> using C# in .NET IDE.
>
> Help me out. Where am i getting it wrong?? If someone else has answered
> this question then provide me the link.
>
>
>
>
>
>
>



 
Reply With Quote
 
=?Utf-8?B?aGVtYW50?=
Guest
Posts: n/a
 
      24th Jan 2005
Hi,

Both of you thanks for the reply( Marc Scheuner, Miha Markic) . I used
the server explorer to test my connection and finally got the connection
string right. Yes you motivated me further to drill down into sql server and
learn more about it.

Thanks again to both of you ( Marc Scheuner , Miha Markic)
Have a nice day!
Hemant


"Miha Markic [MVP C#]" wrote:

> Create a Data Connection within Server Explorer, then drag&drop it on the
> form.
> It will create a SqlConnection with correct connection string for you.
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> SLODUG - Slovene Developer Users Group
> www.rthand.com
>
> Drag&drop
> "hemant" <(E-Mail Removed)> wrote in message
> news:3800A4A4-28E2-45C8-944B-(E-Mail Removed)...
> > Hi,
> > I have been trying to connect SQL Server2000 developer edition using the
> > following string.
> >
> > SqlConnection conn = new
> > SqlConnection("server=localhost;database=pubs;uid=sa;pwd=");
> >
> > I dont know where i am going wrong.
> >
> > SQL Server Service Manager shows the following:
> > Server : Hemant
> > Services : SQL Server
> > Running \\Hemant -MSSQLServer
> >
> > Even tried this command and numerous other combination but none seems to
> > work.
> >
> > SqlConnection conn = new
> > SqlConnection("server=Hemant;database=pubs;uid=sa;pwd=");
> >
> > I want to establish connection using SqlConnection to the database pubs
> > using C# in .NET IDE.
> >
> > Help me out. Where am i getting it wrong?? If someone else has answered
> > this question then provide me the link.
> >
> >
> >
> >
> >
> >
> >

>
>
>

 
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
SQL Server 2000 Developer Edition & Localhost ASP Executed on Win =?Utf-8?B?U0hD?= Windows XP Basics 3 6th Jul 2005 03:33 AM
vb.net standard connect to sql server developer edition =?Utf-8?B?bWlrZWc=?= Microsoft VB .NET 3 7th Feb 2005 03:37 AM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd AMD 64 Bit 0 17th Sep 2004 09:07 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Processors 0 17th Sep 2004 09:01 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit - new ! TEL Windows XP General 0 31st Dec 2003 05:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:05 AM.