Web Config Connecting To SQL 2000

Feb 11, 2007

Hi all,

 I'm having a frustrating time connection to SQL 2000 from the web.config. I'm getting the following error

 Here is my config

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
 <appSettings/>
 <connectionStrings>
 <add name="ConnectionString"
      connectionString="Server=xxxx;Database=xxx;uid=xxx;pwd=xxx;"
      providerName="System.Data.SqlClient" />
   </connectionStrings>
 <system.web>
  <compilation debug="true" strict="false" explicit="true"/>
  <authentication mode="Windows"/>
 </system.web>
</configuration>

This is the error i get

 An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Any thoughts?

Thanks.

View 3 Replies


ADVERTISEMENT

Connecting To SQL Server Exrpress - Using Web.config

Jun 6, 2007

Hello, So I am just getting started with .NET,  I am using Visual Web Developer 2005 Express andSQL Server 2005 Express on XP Media Center (same as XP Pro) ASP.NET version 2.0.????Anyways, I am having the time of my life figuring out how  to connect to SQL Server from within my C#, as follows,(where settings.connection  = ".SQLEXPRESS;Database=MyDatabase;Integrated Security=SSPI;" in my web.config)SqlConnection conn = new SqlConnection(Settings.Connection);        SqlDataReader rdr = null;        try        {            conn.Open();            SqlCommand cmd = new SqlCommand("select * from mytable", conn);            rdr = cmd.ExecuteReader();            while (rdr.Read())            {                Console.WriteLine(rdr[0]);            }        } the above yields unspeakable errors, namely <font color="red"><b>Cannot open database requested by login. login failed for user 'computername/SQLEXPRESS'</b></font> , etcAND<font color="red"><b>A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)</b></font> If you have ANY information on the suspect, please, please report it to me. Greatly appreciated!Thanks, Cam  

View 1 Replies View Related

Connecting To SQL Express 2005 Via Web.Config File In Visual Studio 2003

Oct 30, 2007

Hi
 I am following a project to build a small E-Commerce site from a book I have purchased and I have having problems connecting to the SQL Database with the code supplied.
The book is Apress Beginning ASP.NET 1.1 E-Commerce
http://www.amazon.co.uk/Beginning-ASP-Net-1-1-E-Commerce-Professional/dp/1590592549/ref=sr_11_1/202-7684451-7995058?ie=UTF8&qid=1193780707&sr=11-1
 The code added to the Web.Config file is :
<configuration>
<appSettings>
<add key="ConnectionString" value="Server=(local)NetSDK;Integrated Security=True;Initial Catalog=JokePoint" />
</appSettings>
 
The connection details are in a class file called Catalog.vb and is as follows
Imports System.Data.SqlClientPublic Class Catalog
Public Shared Function GetDepartments() As SqlDataReader
'Create the connection objectDim connection As New SqlConnection(connectionString)
'Create and initialize the command objectDim command As New SqlCommand("GetDepartments", connection)
command.CommandType = CommandType.StoredProcedure
'Open the connection
connection.Open()
'Return a SqlDataReader to the calling functionReturn command.ExecuteReader(CommandBehavior.CloseConnection)
End Function
Private Shared ReadOnly Property connectionString() As String
GetReturn ConfigurationSettings.AppSettings("ConnectionString")
End GetEnd Property
End Class
 The error is.....
Cannot open database "JokePoint" requested by the login. The login failed. Login failed for user 'MachineNameASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "JokePoint" requested by the login. The login failed. Login failed for user 'MachineNameASPNET'.Source Error:




Line 15: 'Open the connection
Line 16:
Line 17: connection.Open()
Line 18:
Line 19: 'Return a SqlDataReader to the calling function
Source File: C:MyCommerceSiteJokePointBusinessObjectsCatalog.vb    Line: 17 Stack Trace:




[SqlException: Cannot open database "JokePoint" requested by the login. The login failed.
Login failed for user 'MachineNameASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
JokePoint.Catalog.GetDepartments() in C:MyCommerceSiteJokePointBusinessObjectsCatalog.vb:17
JokePoint.DepartmentsList.Page_Load(Object sender, EventArgs e) in C:MyCommerceSiteJokePointUserControlsDepartmentsList.ascx.vb:44
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

The connection tests ok in Visual Studio 2003. All permissions are set using SQL Management Studio Express 2005.
The book is using SQL 2000, I have been trying different connection syntax's in the Web.Config file all day and now I have a big headache. I know its something simple, can anyone please advise ?
Thanks in advance.
 
Mark

View 3 Replies View Related

Why Is It I Keep Getting An Error 40 When Trying To Config ASP.NET 2.0 To Use SQL Server 2000

Mar 2, 2007

I'm trying to configure  ASP.NET2.0 Application to use SQL Server 2000  and yes i did make sure all my setup in configuration manager is setup and  the surface area
Whenever i ran the REGSQL .EXE CMD it works until i get to  where it suppose to give you a list of data instance to choose from base on ScottGu article  in step 4
I'm running SQLEXPRESS ADVANCE
VWD EXPRESS 05
Thanks

View 2 Replies View Related

SQL 2000 X32 OnWin2003 X64 Memory Config

Apr 1, 2008



We have a new server (4 dual-core CPUs and 8GB ram) with Windows 2003 x64 installed. We need to put SQL 2000 on the system and want to maximize it for sql performance (will be dedicate to SQL). Do we enable awe in SQL? Are there any 3GB switches we need to put in the boot.ini for the 32-bit subsystem? Should we use the 32bit version of Windows and just use awe and pae?

Thanks
Steve

View 7 Replies View Related

Connecting MS SQL 2000 Thru C++

Sep 6, 2004

Hi,

1)can someone help to explain these 2 lines of codes to me?
I need to change this 2 lines of code to my SQL 2000 database that is connected to my computer locally using Windows NT. How can i change these code?Thanks!

char *connectionString = "dsn=SPS;uid=sa;pwd=;";
hr=pRs->Open(queryString,connectionString,adOpenStatic,adLockOptimistic,adCmdUnknown);

From what i know this is connecting to an instance of the server using sa as login and no password. What does the dns refer to ?

2) If i wan to connect to a database located at the server installed on my computer locally using Windows NT authentication , do i use

"strConnection = _T("Driver={SQL Server};Server=MyServerName;"
"Trusted_Connection=no;"
"Database=SPS;Uid=;Pwd=;");"

If not so,how then?Please kindly advice!

View 1 Replies View Related

Connecting Sql 2000 Sp3 With Asp

Jul 23, 2005

I created a new SQL database using SQL 2000 SP3 on a Windows 2003server. Now when my wed publisher changes his codes in ASP to point tomy new server and SQL database we are getting the message this page cannot be displayed when clicking on the web link. The old SQL databasewas created with SQL 2000 on a Windows 2000 server. Below you will findthe ASP code that we are using. Please Help me!<!--Open Connection to SQL Database--><%'CREATE/OPEN ADO CONNECTION OBJECTDim objConnect, oSurveySet objConnect = Server.CreateObject("ADODB.Connection")oSurvey = "driver={SQL Server};server=SPD-HEAT-01;database=Heat8;" &_"uid=johndoe;pwd=johndoe"objConnect.Open oSurvey,"",""%>

View 1 Replies View Related

Connecting To SQL 2000

Oct 21, 2006

Is is possible to sync SQL Mobile 2005 with SQL Server 2000 using replication? Or do I need to use SQL Server 2005 or drop back to SQL Server 2000 CE.......

Thanks

View 1 Replies View Related

Having Problem While Connecting Sql 2000

Nov 2, 2006

im using sql server 2000 and i m facing this problem plz tell me why is this"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

View 5 Replies View Related

Connecting To Sql Server 2000 In A Lan

May 22, 2007

Hi there,
I have 2 servers on our compny'ssql server does not exist or access denied lan, one with fixed ip and the other one with internal ip. I installed SQL server 2000 on the one with internal ip and I want to access it from the other server. when I want to register sql server instanse , I can see the name of that instance in the list but I can't register it. I keep reciving this error  : sql server does not exist or access denied!
Could any one told me what to do?

View 2 Replies View Related

Error Connecting To SQL 2000

Aug 12, 2007

I am using Visual Studio 2005 with SQL Server 2000. I'm having an issue where I can build my website just fine for long periods of time, and then for what appears to be no reason, my site errors out when trying to connect to the database with the message below -- the thing is I don't want to use a SQL Server 2005 database, nor do I have Server 2005 or Server Express loaded. How can I unhook this and make it use SQL 2000?"An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) "

View 5 Replies View Related

Error When Connecting To Sql 2000

Sep 11, 2007

I am trying to connect to a sql 2k database using a Microsoft Application block. I get the following error. It is saying about 2005, I verified that SQL 2K is running on the server.
System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings
 
Any help will be appreciated.

View 5 Replies View Related

Connecting To SQL Server 2000

Dec 23, 2005

Hi
I am running Visual Studio 2005 Visual Web Developer Standard Edition on a machine with SQL Server 2000.   Could you please teach me how to modify the connection string below so that it connects to SQL Server 2000 with the database called "VisualWebDev".
Thank you.
Jim
 
<connectionStrings>
<add name="Personal" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=.SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf"/>
</connectionStrings>

View 12 Replies View Related

Connecting Oracle To SQL 2000?

Jan 28, 2005

Hi, i need to build some way of connecting Oracle to SQL Server in order to pull data off Oracle and house it temporarily on SQL 2000 for searching.

Basically we've built an intranet using ASP and SQL 2000 and which also pulls data off Oracle, however our connection to Oracle is very slow so an idea to speed it up would be to have SQL store a temporary snapshot of this data and the ASP site query off the fast connection it has to SQL rather than use our slow connection to Oracle.

This temporary snapshot of Oracle data would be stored on SQL 2000 and updated on a scheduled basis.

Any ideas how to do this, or a better way to work this?

Thing is I tried installing the Official Oracle ODBC & Client software on our SQL 2000 server before and it just took out SQL 2000 so would really like to hear other options.

Thanks in advance,

:confused:

View 2 Replies View Related

Connecting To Access 2000 DB

Mar 19, 2008

I have been using Access 2000 for quite some time and am trying move the application to use SQL Server 2005 Express. Is there any way to connect directly to an Access MDB using SQL Server 2005 Express, or can it only connect to an MDF?

View 3 Replies View Related

Connecting To SQL Server 2000

Jul 23, 2005

Hi,I am total newbie to SQL Server. My new host tells me I can connect throughAccessXP or 2002. I have Access 2000. Can I not connect with that also?Thanks, JA

View 4 Replies View Related

2005 Connecting 2000 ?

Oct 28, 2006

if I install SServer Express EditionCan I connect to SServer 2000 DB ?thanks

View 1 Replies View Related

Connecting SQL 2000 Using SQL 2005

Feb 7, 2007

Hi,I have installed SQL 2005 in my PC and am trying to connect to SQLServer 2000 installed in a different machine. Both the server areinstalled in mixed mode.I can connect to the 2000 server from 2005's SSMS using windowsauthentication mode but fail to connect using SQL authentication.The follwoing message is displayed.Cannot connect to <servername>.Additional information:Login failed for user 'username'. (Microsoft SQL Server, Error: 18456)TIA,Taw.

View 4 Replies View Related

Error Connecting To SQL 2000

Aug 12, 2007

I am using Visual Studio 2005 with SQL Server 2000. I'm having an issue where I can build my website just fine for long periods of time, and then for what appears to be no reason, my site errors out when trying to connect to the database with the message below -- the thing is I don't want to use a SQL Server 2005 database, nor do I have Server 2005 or Server Express loaded. How can I unhook this and make it use SQL 2000?

"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) "

View 1 Replies View Related

Connecting To SQL Serve 2000

Feb 25, 2008

Hello everyone I€™m trying to figure out a scenario, please help me out through your replies.

I have a server (ETL Server) ETL tool used is SQL Server Integration Services
And I have a source system with SQL Serve 2000 installed.
The problem I€™m facing in here is I€™m not able to get connect to my source system through connection manager.

I had developed few packages earlier but my source was oracle so I had installed oracle client in my ETL Server and got my source component connected to the source system.

Now I wanted to connect to sql sercer database in different server in network.

I would highly appreciate if you could help me out.
Thank you

View 8 Replies View Related

Connecting To The Database In SQL Server 2000

Jan 31, 2007

I am developing a system using VS 2003 with database SQL Server 2000.
In web.config,  I have added the following code in it
    <sessionState
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Database=grandb;Trusted_Connection=yes"
            cookieless="false"
            timeout="60"
    />
 
Actually I don't know if the above code is correct. My database is stored in the SQL Server 2000 and named as grandb.
Thank you.

View 3 Replies View Related

Connecting To MS SQL Server 2000 From The Different Domains Using Asp.net

Jul 24, 2007

Hi,
      My problem is somewhat like this that, i want to connect my all applications (developed in asp.net)  to one database. In other words i want to make a centralised database that can be accessible from the application running at the different domains. When i did so  by using the same username, password, database and server...i recieve an error that, "connection cannot be establised".
If any body have the solution for this problem. then please do write the "connection string"  for me that can be efficiantly used on the applications running on differnt domains.
Thanks and Regards,
Steve Dcosta
 

View 1 Replies View Related

Connecting Aspx To SQL Server 2000

Jul 24, 2007

Hello All,
 I am just getting started on aspx, coming from an asp background.
I created the following connectionString in my web.config file:<connectionStrings>
<add name="OuWebDB"
connectionString="server=OurServer;database=OurDatabase;uid=TheUser;pwd=ThePassword"providerName="System.Data.SqlClient"
/>
</connectionStrings>
 
when I run this aspx file, from a machine, I get the following error:
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Help!!
 
thanks

View 3 Replies View Related

Connecting To Northwind On SQL Server 2000

Jan 14, 2004

I've just installed SQL Server 2000 on my local machine. I'm using the following element in my web.config file for my connection string.

<add key="SqlNWind512" value="server=(local)141.705.84.745;database=Northwind;
user id=sa;pwd=h3fe8eq7;packet size=512;" />

Unfortunately, I'm getting the following error on my aspx page:

SQL Server does not exist or access denied.

I had no problem writing a connection string to connect to the MSDE installed on my computer, but making a connection to the Northwind database on my newly installed SQL Server 2000 Developer edition has been elusive to me.

I'm sure my IP address is correct. The authentication mode for logging into the database via Enterprise Manager is setup to require a password for sa. Therefore, I assume it's required in the connection string???

Maybe not so coincidentally, while I have been able to open this database through the Server Explorer in VS.NET, I'm not able to access it via Enterprise Mananger (no response, it just hangs) or my aspx pages.

I'm dying here!!! Is my connection string wrong? Any insights would be greatly appreciated!

View 3 Replies View Related

Frustrating Error Connecting To SQL 2000 From IIS With .NET 2.0

Jan 3, 2006

I am getting the following error when connecting to SQL 2000 from IIS with .NET 2.0.
It works perfectly with the Test Server that comes with VS 2005.
 
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

View 7 Replies View Related

Problem With SQL 7 And Windows 2000 - Connecting

Jun 1, 2001

I'm having problem with SQL Server 7 and
Windows 2000. We are deploying an application
made with VB6. This application is multi-users.
Our client has a network of 3 computers. One of
these computers is the server. The application is
deployed on all 3 machines. On the server,
everything goes well. It is possible to connect,
to insert new data, etc. On the 2 other computers,
with the account that installated SQL7 and created
the DB, USER1, there`s no problem at all. With ANY
other account, it is possible to access most of the
application, but some forms would just not access
the DB. We tried to give all rights to all users
on the SQL Server. Nothing. The security used is
Windows NT (2000). There is no rights on tables.
We tried to make a duplicate of the original USER1
account, with all the same rights. It doesn't work
any better.

So all our security is down, and we're still not
accessing with other accounts. We're connecting
SQL Server via the ODBC. I don`t have a clue what
to do next. Please let me know if you have any hints.

View 1 Replies View Related

Connecting To Sybase From MS SQL Server 2000

Feb 24, 2003

I've installed Sybase client 12.0 and have created the DSN (it is successful, connection is established)
but when I run this ActiveX Script from DTS Package it give me error Data Source Name not found and no default driver specified

Dim RS
Dim oConn


Set oConn = CreateObject("ADODB.Connection")
msgbox "set oConn"
Set RS = CreateObject("ADODB.Recordset")
msgbox "RS"
(I've tried both open statement in both it gives me same error)
oConn.Open = "Driver={Sybase ASE ODBC Drivers};Srvr=Server1;Uid=sa;Pwd=password"

oConn.Open="DSN=Test;Uid=sa;Pwd=password"
msgbox "open"

Can anyone guide me?

Thanks in advance

-Sejal

View 2 Replies View Related

Connecting To SQL 7 Through Enterprise Manager 2000

May 17, 2002

Is it possible to connect to a SQL Server 7 remotely from a SQL 2000 Enterprise Manager. I have been given the alias config from my web hosting service but no joy on the connection.

Thanks


Anthony

View 1 Replies View Related

Connecting To SQLServer 2000 (sqlsrv32.dll)

Oct 14, 2004

Hello,

I am having problem with our network. We run a clinic database system that uses SQLServer 2000 Enterprise as the backend, and Microsoft Access on the front end.

I have had a running problem with all our newer machines (which run Windows 2000 or XP) in that while it connects to the server and retrieves some of the info properly, on some of the pages it doesnt. It will take 2 or 3 minutes for a page of the database to load, and even then not all the information will be retrieved properly.

I was able to fix the problem on the Windows 2000 machines by replacing the Sqlsrv32.dll file with an older version (usually with 3.70.06.23). And then the W2000 machines would work. But for some reason, the XP machines wont accept the older sqlsrv32.dll file...it gives me this error:
SQLState: 'HY000'
SQL Server Error: 126 Unable to load communication module driver correctly.

....and i cant seem to downgrade the MDAC....

any ideas on what I can do?

thanks

View 2 Replies View Related

Problem Connecting To SQL Server 2000

Mar 15, 2004

We have installed SQL Server 2000 in our new server running on Microsoft Windows Server 2003.

We tried to connect to the database in the Server where it is installed. We are able to connect when we give server name. We are unable to connect when we give IP Address of the server.

We have latest SP3a of SQL Server 2000 installed.

Could anyone help us in resolving this issue?

Thanks in Advance.

View 1 Replies View Related

Connecting To SQL Server 2000 On Another Subnet

Jul 23, 2005

Hi Folks,I'm very new to SQL Server. I have a home network. My primary connectionto the internet is using "Gateway 1" a linksys router, of which, my serveris a LAN node on that router. I have another LAN node connecting to the WANnode of the "Gateway 2" a wireless USR router to use with my laptop. Usingthe wireless laptop, I am on a different subnet than the Server. I'd liketo make a connection to the server through Visual Studio.net but I can'tseem to do it. I'm using TCP/IP with a port different than the default port(let's call it port 2110, even though it's not). I do have port forwardingon Gateway1 and I've tried everything from just the server internal IPaddress, the external IP address, IP address with port designation, URL withport designation, nothing seems to work. Any ideas?Thanks!Rick

View 1 Replies View Related

I Need Help Connecting Access 97 To SQL Server 2000

Jul 23, 2005

I have an Access 97 database that I connect to a SQL Server 2000through ODBC. I have to manually set up the ODBC connection on eachuser's machine if I want them to be able to use the application though.Is there a way to store the connection string within the Access DB soI don't have to touch the ODBC settings on each user's machine? Or isthere a different solution that I'm missing? There are way too manyfor me tosetup. Thanks in advance.

View 1 Replies View Related

Connecting To SQLServer 2000 Using DNS Alias

Jul 20, 2005

Hi all,I have to move my SQlServer 2000 instance from one server'actual_server' to another server 'new_server'.But, the different applications connecting to the actual server can'teasily change their connections address. i.e it connect to'actual_server' server only.Is there a risk to declare a DNS alias 'actual_server' pointing to'new_server' ?So I could move my databases from 'actual_server' to 'new_server'.Is the modification transparent to the client ?I especially thinking about wins...TYIACordiallyRJP

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved