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

sql Server not found

hi,
i was practising the famous 'northwind database' using vb.net sample
examples. But i am getting an error
'sql server does not exist or access denied'

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"
Dim northwindConnection As New SqlConnection(connectionString)
Dim cmd As New SqlCommand(strSQL, northwindConnection)
northwindConnection.Open() //error here

COULD SOMEONE PLEASE ADVICE.
I have got SQL Server 2005 installed in the system and i am using .net 2003

TIA
irfan
Nov 21 '05 #1
9 1546
In your connection string you do not include the database name. You could
try and open the connection using the Server Explorer. This would eliminate
your code. Then, drag the connection onto the designer window and you will
see the correct ConnectionString property.


"Irfan Mumtaz" <sp****@spam.net> wrote in message
news:99**********************************@microsof t.com...
hi,
i was practising the famous 'northwind database' using vb.net sample
examples. But i am getting an error
'sql server does not exist or access denied'

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"
Dim northwindConnection As New SqlConnection(connectionString)
Dim cmd As New SqlCommand(strSQL, northwindConnection)
northwindConnection.Open() //error here

COULD SOMEONE PLEASE ADVICE.
I have got SQL Server 2005 installed in the system and i am using .net
2003

TIA
irfan

Nov 21 '05 #2
"Irfan Mumtaz" <sp****@spam.net> schrieb:
i was practising the famous 'northwind database' using vb.net sample
examples. But i am getting an error
'sql server does not exist or access denied'

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"


Make sure you are using a complete connection string (at least the database
name is missing). You'll find connection strings for SQL Server at
<URL:http://www.connectionstrings.com/>.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
Irfan

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"
Dim northwindConnection As New SqlConnection(connectionString)
Dim cmd As New SqlCommand(strSQL, northwindConnection)
northwindConnection.Open() //error here

In my opinion is there most probably nothing wrong with your Connection
string and it depends for what you are using it, however it does not access
the northwind database, so when your SQL string contains a table for that it
will not be processed.

You can try this one by setting "USE Northwind" as first in your Select
statement.
(Or change the connection string when you don't have to create or to drop
that database what is not likely in this case by just changing
DataBase=Northwind)

However it is in fact not wrong.

I hope this helps,

Cor

Nov 21 '05 #4
thanks for the replies
I used the server explorer and when i clicked on the Sql Servers, it is
giving me an sql server login dialog box
when i press OK, to enter password and when i press OK it gives
'SQL sever does not exists'.

Thanks again for the response

irfan
"JohnFol" <Ou************@WibbleObbble.Com> wrote in message
news:yK*****************@newsfe2-gui.ntli.net...
In your connection string you do not include the database name. You could
try and open the connection using the Server Explorer. This would
eliminate your code. Then, drag the connection onto the designer window
and you will see the correct ConnectionString property.


"Irfan Mumtaz" <sp****@spam.net> wrote in message
news:99**********************************@microsof t.com...
hi,
i was practising the famous 'northwind database' using vb.net sample
examples. But i am getting an error
'sql server does not exist or access denied'

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"
Dim northwindConnection As New SqlConnection(connectionString)
Dim cmd As New SqlCommand(strSQL, northwindConnection)
northwindConnection.Open() //error here

COULD SOMEONE PLEASE ADVICE.
I have got SQL Server 2005 installed in the system and i am using .net
2003

TIA
irfan


Nov 21 '05 #5
Irfan,

I am using WinXP SP2 and I cannot get connected to SQL Server either.
The solution is to use the name of your computer rather than localhost.
So if your computer is named 'irfan' use irfan. This happends due some
changes in SP2 of XP. I thnk these changes are implemented in SP1 for
Win2003 too.

Regards,

Philip.

Nov 21 '05 #6
I wrote the DataBase=Northwind, but still it gives the same error. 'Sql
server does not exist'.

BTW, how do i know if the Northwind is installed on the sql server and if it
isnt how do i install it.

TIA

irfan
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Irfan

connectionString = "Server=localhost;DataBase=;Integrated Security=SSPI"
Dim northwindConnection As New SqlConnection(connectionString)
Dim cmd As New SqlCommand(strSQL, northwindConnection)
northwindConnection.Open() //error here

In my opinion is there most probably nothing wrong with your Connection
string and it depends for what you are using it, however it does not
access the northwind database, so when your SQL string contains a table
for that it will not be processed.

You can try this one by setting "USE Northwind" as first in your Select
statement.
(Or change the connection string when you don't have to create or to drop
that database what is not likely in this case by just changing
DataBase=Northwind)

However it is in fact not wrong.

I hope this helps,

Cor

Nov 21 '05 #7
I tried your suggestion also but still the same thing.
BTW, how do i know that northwind is installed on SQL server. If it isnt
then how do i install it

regards,
irfan
"Philip Hristov" <ph********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Irfan,

I am using WinXP SP2 and I cannot get connected to SQL Server either.
The solution is to use the name of your computer rather than localhost.
So if your computer is named 'irfan' use irfan. This happends due some
changes in SP2 of XP. I thnk these changes are implemented in SP1 for
Win2003 too.

Regards,

Philip.

Nov 21 '05 #8
Related to your other question as well

http://www.microsoft.com/downloads/d...displaylang=en

I hope this helps,

Cor
Nov 21 '05 #9
Irfan, Northwind is included in SQL Server Developer Edition and
Enterprise. It is not included in MSDE 2000.

Philip.

Nov 21 '05 #10

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

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
2
by: Amanda | last post by:
From a guy in Microsoft newsgroups: | In *comp.databases.ibm-db2* there are always IBM guys | from the Toronto labs on line.Post with the | -for the love of god please help- | line...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
5
by: TB | last post by:
Hi All: This news group is proving to be great help on my path towards mastering ASP.NET thanks to all of you helpful souls out there. I am looking forward to the day when I can contribute...
5
by: JR | last post by:
Here's the scenerio: HAD: Entire Windows 2000 domain multiple servers Internal Web Server - Windows 2000 NAS Server - Windows 2000 Internal Web Application (On Web server) utilizing .ASP...
0
by: aartinawani | last post by:
Hi I have an asp.net application running under Windows 2003 Server, IIS 6, for 2 years. Today, suddenly, the site went down at 3:38 pm and the application raised an error entitled "Server too...
17
by: Jon B | last post by:
Hi All! I have a ASP.NET 2.0 site that works on the Windows 2000 Server. However, when I tried to view this site on my local Windows XP machine, I get "Server Unavailable". If I switch the...
0
by: kolalakitty | last post by:
Hopefully someone here can help me/point me in the right direction. I've found tons of references towards making relations, creating rows, saving said rows, using datagrids, databinding objects,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.