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 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
"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/>
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
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
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.
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
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.
Irfan, Northwind is included in SQL Server Developer Edition and
Enterprise. It is not included in MSDE 2000.
Philip. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
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...
|
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...
|
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,...
|
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,...
| |