473,761 Members | 3,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS 2003 + opening a connection to SQL SERVER 2000 database

Hey all

I am building a new computer.
I have Windows XP Pro with SP2 and all the updates.

I installed VS 2003.
Then copied a project from my old computer to the new one.

When I try and run the project .. it errors out saying it "sql server does
not exist or access denied"

The connection string is obviously the exact same as when it ran on the old
computer ... as all the files came from the old computer ... where the
project works just fine.
The MSSQL server is running on a seperate computer all together.

I can open query analyzer and access the database, no problem. On the new
machine.
I can even use Tools .. Connect to Database ... in VS 2003 IDE and that
works ...

Just in my vb.net code is it failing .. and again .. it work just fine on
the old development machine.
Any ideas ??

Thanks
Jon

Nov 20 '05
18 1996
Try some of these trouble shooting things.

http://support.microsoft.com/kb/827422

I would also verify with a watch that the value being read from the
web.config is what you think it is.

Greg

"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ta******** *************** *******@comcast .com...
In VS 2003 ... I had changed the catch to catch ex as exception ...
Then put a break point in that section ... when it stopped there ... I did
a quick watch on ex ...
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:uM******** ********@TK2MSF TNGP12.phx.gbl. ..
You say you are getting "sql server does not exist or access denied", but
I don't see where you are recording the error in your catch statement.
How can you tell what the error is from the code you posted?

Try
...
Catch ex as exception
trace.warn(ex.t ostring)
...
Finally
...
End Try

Change your catch to something like that. You could, of course, put a
breakpoint on the catch statement itself and take a look ex's value.

Greg
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ZO******** ************@co mcast.com...
Oh yeah ... the server that sql server 2000 is running on is Windows
2000

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:Oi******** ********@TK2MSF TNGP10.phx.gbl. ..
Sorry for the bad grammar. :^) Let's try that again.

Is this a web app? What does your connection string look like? Are you
connecting to SQL using integrated security? Is it trying to use your
local ASPNET account?

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:OK******** ********@TK2MSF TNGP12.phx.gbl. ..
> Is this a web app? What is does your connection string look like? Are
> you connection to SQL using integrated security? Is it using trying
> to use your local ASPNET account?



Nov 20 '05 #11
Will do .. thanks ... and did a watch on that too :-D

I appreciate all your assistance.

Thank you
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:ub******** ******@TK2MSFTN GP09.phx.gbl...
Try some of these trouble shooting things.

http://support.microsoft.com/kb/827422

I would also verify with a watch that the value being read from the
web.config is what you think it is.

Greg

"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ta******** *************** *******@comcast .com...
In VS 2003 ... I had changed the catch to catch ex as exception ...
Then put a break point in that section ... when it stopped there ... I
did a quick watch on ex ...
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:uM******** ********@TK2MSF TNGP12.phx.gbl. ..
You say you are getting "sql server does not exist or access denied",
but I don't see where you are recording the error in your catch
statement. How can you tell what the error is from the code you posted?

Try
...
Catch ex as exception
trace.warn(ex.t ostring)
...
Finally
...
End Try

Change your catch to something like that. You could, of course, put a
breakpoint on the catch statement itself and take a look ex's value.

Greg
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ZO******** ************@co mcast.com...
Oh yeah ... the server that sql server 2000 is running on is Windows
2000

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:Oi******** ********@TK2MSF TNGP10.phx.gbl. ..
> Sorry for the bad grammar. :^) Let's try that again.
>
> Is this a web app? What does your connection string look like? Are
> you connecting to SQL using integrated security? Is it trying to use
> your local ASPNET account?
>
> "Greg Burns" <bl*******@news groups.nospam> wrote in message
> news:OK******** ********@TK2MSF TNGP12.phx.gbl. ..
>> Is this a web app? What is does your connection string look like?
>> Are you connection to SQL using integrated security? Is it using
>> trying to use your local ASPNET account?
>
>



Nov 20 '05 #12
Jon,

Please review this KB, and see if it applies to your case :
http://support.microsoft.com/default...b;en-us;315159

If your ASP.NET worker process is running under the ASPNET account,
and your SQL server is using named pipes to receive connections,
there's a bug for the .Net Framework 1.1 and ASP.NET 1.1 :
the ASPNET account cannot establish a named pipes connection to the
SQL server, unless you do one of these two things :

1. Turn on impersonation for your ASP.NET application.

2. Use TCP/IP instead of the named pipes protocol to connect to the db.

To use TCP/IP, add "Network Library =dbmssocn" to your connection string.

"User ID=sa;Password= Password;Initia l Catalog=Shepher dRepository;Dat a
Source=server;C onnect Timeout=120;Net work Library =dbmssocn"

If you use impersonation you don't have to do that, but remember
that the Application's user will be changed to IUSR_Machinenam e

( That's why using impersonation works,
because it doesn't use the ASPNET account any more ).

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
ASPNETFAQ.COM : http://www.aspnetfaq.com/
Foros de ASP.NET en Español : http://asp.net.do/foros/
=============== =============== ========
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:8Z******** ************@co mcast.com...
Will do .. thanks ... and did a watch on that too :-D

I appreciate all your assistance.

Thank you
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:ub******** ******@TK2MSFTN GP09.phx.gbl...
Try some of these trouble shooting things.

http://support.microsoft.com/kb/827422

I would also verify with a watch that the value being read from the web.config is what
you think it is.

Greg

"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ta******** *************** *******@comcast .com...
In VS 2003 ... I had changed the catch to catch ex as exception ...
Then put a break point in that section ... when it stopped there ... I did a quick
watch on ex ...
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:uM******** ********@TK2MSF TNGP12.phx.gbl. ..
You say you are getting "sql server does not exist or access denied", but I don't see
where you are recording the error in your catch statement. How can you tell what the
error is from the code you posted?

Try
...
Catch ex as exception
trace.warn(ex.t ostring)
...
Finally
...
End Try

Change your catch to something like that. You could, of course, put a breakpoint on
the catch statement itself and take a look ex's value.

Greg
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:ZO******** ************@co mcast.com...
> Oh yeah ... the server that sql server 2000 is running on is Windows 2000
>
> "Greg Burns" <bl*******@news groups.nospam> wrote in message
> news:Oi******** ********@TK2MSF TNGP10.phx.gbl. ..
>> Sorry for the bad grammar. :^) Let's try that again.
>>
>> Is this a web app? What does your connection string look like? Are you connecting
>> to SQL using integrated security? Is it trying to use your local ASPNET account?
>>
>> "Greg Burns" <bl*******@news groups.nospam> wrote in message
>> news:OK******** ********@TK2MSF TNGP12.phx.gbl. ..
>>> Is this a web app? What is does your connection string look like? Are you
>>> connection to SQL using integrated security? Is it using trying to use your local
>>> ASPNET account?

Nov 20 '05 #14
It is certainly looking more like the ASPNET user ... I just created a new
project .. a Windows App .. worked just fine.
One button that created a connection .. and used the exact connection string
...

Then created a new web app ... with just the one button ..
that fails

I added the Network Library=dbmssoc n to my connection string, still errors
out.

Will keep plugging away.

Thanks again for everything.
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:u7******** ******@TK2MSFTN GP14.phx.gbl...
http://support.microsoft.com/?kbid=328306

http://support.microsoft.com/kb/827422

http://support.microsoft.com/?kbid=888228

Greg

Nov 20 '05 #15
I installed VS 2005 ... that works fine.
VS 2003 .. doesn't ... it has to be something with 1.1 .. no ?

"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:9r******** *************** *******@comcast .com...
It is certainly looking more like the ASPNET user ... I just created a new
project .. a Windows App .. worked just fine.
One button that created a connection .. and used the exact connection
string ..

Then created a new web app ... with just the one button ..
that fails

I added the Network Library=dbmssoc n to my connection string, still errors
out.

Will keep plugging away.

Thanks again for everything.
"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:u7******** ******@TK2MSFTN GP14.phx.gbl...
http://support.microsoft.com/?kbid=328306

http://support.microsoft.com/kb/827422

http://support.microsoft.com/?kbid=888228

Greg


Nov 20 '05 #16
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:nL******** ************@co mcast.com...
I installed VS 2005 ... that works fine.
VS 2003 .. doesn't ... it has to be something with 1.1 .. no ?


Well, VS 2005 web apps runs filesystem-based by default when developing.
Not even sure if it is using the ASPNET user in that context.

Do you have the same problem if you create you test project in VS 2005 using
IIS?

Greg
Nov 20 '05 #17
I created a test project in VS 2005 .. its a web app .. and it connects to
the sql server, using the same connection string I use in VS 2003.
2005 works.. no problem.

I created a seperate test project in VS 2003 ... web app .. using the same
connection string ... it doesn't work.

Each is just a webform .. with a button .. when the button is clicked .. it
creates a connection .. closes the connection ... and thats it

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:nL******** ************@co mcast.com...
I installed VS 2005 ... that works fine.
VS 2003 .. doesn't ... it has to be something with 1.1 .. no ?


Well, VS 2005 web apps runs filesystem-based by default when developing.
Not even sure if it is using the ASPNET user in that context.

Do you have the same problem if you create you test project in VS 2005
using IIS?

Greg

Nov 21 '05 #18
The continuing saga ...

Well just to make sure it wasn't an XP installation problem. I installed a
new copy of XP into a new folder.
I then reinstalled vs.2003 ... it exhibits the same problem ... doesn't find
my sql server .. when a test web project is run.

Only other thing I can come up with, is the vs 2002 was installed on my
current development machine prior to vs 2003 being installed.
Could that be something that might effect vs 2003 on the new machine, the
fact thet VS 2002 was never installed ?

"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:yJ******** ************@co mcast.com...
I created a test project in VS 2005 .. its a web app .. and it connects to
the sql server, using the same connection string I use in VS 2003.
2005 works.. no problem.

I created a seperate test project in VS 2003 ... web app .. using the same
connection string ... it doesn't work.

Each is just a webform .. with a button .. when the button is clicked ..
it creates a connection .. closes the connection ... and thats it

"Greg Burns" <bl*******@news groups.nospam> wrote in message
news:eb******** ******@TK2MSFTN GP14.phx.gbl...
"Jon Delano" <jd*****@hotmai l.com> wrote in message
news:nL******** ************@co mcast.com...
I installed VS 2005 ... that works fine.
VS 2003 .. doesn't ... it has to be something with 1.1 .. no ?


Well, VS 2005 web apps runs filesystem-based by default when developing.
Not even sure if it is using the ASPNET user in that context.

Do you have the same problem if you create you test project in VS 2005
using IIS?

Greg


Nov 29 '05 #19

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

Similar topics

11
3764
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows 2003 Server or ADO or ODBC issue, I am posting this on all of the three newsgroups. That's the setup: Windows 2003 Server with IIS and ASP.NET actiavted Access 2002 mdb file (and yes, proper rights are set on TMP paths and path,
1
2391
by: Marino | last post by:
Hi all, I have a Windows 2003 server, which is also a terminal server for application, with sql 2000 installed. My company has developed an application that uses SQL 2000 as its database. The application is a client/server one. In each client computer there's a link to the application on the server. There is no problem with Windows 98, Windows 2000 pro, Windows xp pro clients, but the windows 95 ones cannot log in to the database. The...
2
3215
by: Vaap | last post by:
I did lot of googling to see if I can solve the SQL server not found problem while trying to run ASP.Net community starter kit from an XP machine to Windows 2003 server hosting SQL server 2000 database. Tried all possible combinations but it still fails. I have Windows 2003 server having SQL Server 2000 installed with SP2. The installation went Ok on a XP professional machine and I was able to create database and user logins etc on...
5
3812
by: Microsoft | last post by:
Hi, I have Visual Basic .net 2003 (Standard Edition) & SQL Server 2000 Developer Edition. When trying to create a connection in the server explorer from the .net IDE I get a number of problems; a.. Under the "Connection" tab, under "1. Select or enter a server name:" when I either select the drop down box or click the refresh button I get an error dialog saying "Error enumerating data servers. Enumerator reports Unspecified error'". The...
3
2013
by: Vinod R.Shenoy | last post by:
Hi All, Came across a post wherin you had helped somebody with a similar problem and was wondering if you could help us out with it. Our problem is , We have a development SQL Server 2000 (running on Win2K SP4) machine that we want to run on a Windows 2003 server machine and access it via our internal LAN. We have opened the firewall to allow our applications
4
3153
by: Cindy H | last post by:
Hi I am currently using Visual Studio.Net 2003 running on Windows Server 2000 operating system. I have used Visual Studio.net 2003 connecting to Access 2002 databases in the pass with great success. Now, I have a need to go to Access 2007 which produces database.accdb file instead of database.mdb. I've used ole db Jet 4.0 to connect to Access 2002 in Visual Studio.Net 2003, now I guess you need to use Microsoft Ace 12.0 to make a...
2
4594
by: Bruce | last post by:
Hello all, I have an annoyance that is common to all of the Access 2003 applications I manage. All of the applications are split front end/ back end with a front end copy on each client workstation and back ends on a common server. They are all secured with workgroup files also residing on the server. Each front end has a mix of linked tables and local tables. The annoyance I have noticed is that it sometimes takes 10 to 15 seconds...
0
9554
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9377
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.