Error Message: Cannot Open Database.[DBNETLIB][ConnectionOpen(Connect()).] SQL Server Does Not Exist Or Access Denied.
Mar 20, 2008
I installed SQL 2005 including backward compatibility, MSDN libraries and SP2 a new Windows 2003 server (chose mixed mode authentication). Installation was successful and I then installed an off the shelf database with Windows authentication which also installed successfully.
I created a new group in AD, added the database users into the group and gave db-owner rights to the group in SQL as advised by the installation guide. However, when I try to open the database it gives an error message saying "Cannot open database.[DBNETLIB][ConnectionOpen(Connect()).] SQL server does not exist or access denied". I also tested it adding an individual user (myself) as a user to no avail.
When I set up DSN in ODBC on my computer I can successfully test the connection but can't run the application. The connection is via TCP/IP.
Any suggestions?
View 7 Replies
ADVERTISEMENT
Mar 2, 2007
I installed the SQL SERVER , Oracle
client on my computer, and I can connect to remote SQL server,oracle databases using wizards , however when I try to run application iam getting this error.
Server Error in '/shiva/datagrd' Application.
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access denied. 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.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL
Server does not exist or access denied.Source Error:
Line 40: //SqlDataAdapter da=new SqlDataAdapter("select * from sms",con);Line 41: DataSet ds=new DataSet();Line 42: da.Fill(ds,"tab");Line 43: DataGrid1.DataSource=ds.Tables[0].DefaultView;Line 44: DataGrid1.DataBind();Source
File: e:shivadatagrdwebform1.aspx.cs Line: 42 Stack
Trace:
[OleDbException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.] System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) System.Data.OleDb.OleDbConnection.InitializeProvider() System.Data.OleDb.OleDbConnection.Open() System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) datagrd.WebForm1.Page_Load(Object sender, EventArgs e) in e:shivadatagrdwebform1.aspx.cs:42 System.Web.UI.Control.OnLoad(EventArgs e) System.Web.UI.Control.LoadRecursive() System.Web.UI.Page.ProcessRequestMain()
Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573 please provide the solution.
View 12 Replies
View Related
Apr 15, 2005
hello,
I hope someone can help me with the problem I am having, I get the following error:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
I am trying to connect to my SQL
Server 2000 db via asp.net. The aspx file uses a DataGrid, the aspx.vb
code behind file gets the connection string from the web.config file. I
tested my connection via ODBC, or SQL Query Analyzer just fine so I
know the userid/password is correct.
this is the snipplet code from the aspx.vb code-behind file:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim dbConn As OleDbConnection
Dim dCmd As OleDbCommand
Dim dReader As OleDbDataReader
Dim strConnection As String
Dim strSQL As String
If (Not Page.IsPostBack) Then
Try
'get the connection string from web.config and open a connection
'to the database
strConnection = ConfigurationSettings.AppSettings("dbConnectionString")
dbConn = New OleDb.OleDbConnection(strConnection)
dbConn.Open()
'build the query string and get the data from the database
strSQL = "SELECT Title, ISBN, Publisher " & _
"FROM Book " & _
"ORDER BY Title"
dCmd = New OleDbCommand(strSQL, dbConn)
dReader = dCmd.ExecuteReader()
'set the source of the data for the datagrid control and bind it
dgQuick.DataSource = dReader
dgQuick.DataBind()
Finally
'cleanup
If (Not IsNothing(dReader)) Then
dReader.Close()
End If
If (Not IsNothing(dbConn)) Then
dbConn.Close()
End If
End Try
End If
End Sub 'Page_Load
End Class
this is the connection string inside the web.config file:
<!--add key="dbConnectionString"
value="Provider=SQLOLEDB;Data Source=localhost;Initial
Catalog=myDBName;UID=myUserID;PWD=myUserPssd" /-->
<!--add
key="sqlConnectionString" value="Data Source=localhost;Initial
Catalog=myDBName;UID=myUserID;PWD=myUserPssd;persist security
info=False;" /-->
thanks,
arlena
View 1 Replies
View Related
Aug 8, 2005
Hi have created an application in asp.net to connect to a sql database. The reason why I am sooooo very confused is because the connection to the database works if i keep the project on my local machine and connect to the database on the server, but as soon as I upload the project to the server, I get the following error when I try to connect to the database: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access deniedCan anyone tell me why this is happenning? - PLEASE - Any help will be appreciatedThanks, Danielle
View 1 Replies
View Related
May 27, 2006
ok im a CS student, installed visual studio .net, and im trying to connect to a ms sql database (Northwind), but I keep getting a error that "[DBNETLIB][ConnectionOpen(Connect()).] SQL Server does not exist or access denied" in visual studio whenever I try creating a new database connection. How do I know if SQL server is installed on my system? cuz in my systray I see SQL server service manager, is that the same thing as SQL server? or do I need to download the full version or something? also could it be that a certain port on my system is not open that SQL server requires to be open?
Thanks
Ron
View 1 Replies
View Related
Apr 5, 2006
Hi all.
I'm running a large data transaction and get the next error :
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
In this case, I process over many, many records, and then it finally indicated the server doesn't exist. This only occurs sometime.
I have SQLServer 2000 on Windows 2003 Server
Some idea how to solve this.
Thanks advanced
Wil.
View 6 Replies
View Related
Aug 17, 2007
hi all,
this is punya,
and i am having a problem which was encountered by youin the past. My actual proble is " I am having vs.net 2005 along with MS SQL Server 2000 (Server1) in my system. The MS SQL Server is database server for some of my collegues. Whenever i want to connect to my Server1 DBServer it is givng the following error message."
"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied"
and the other guys are able to connect to the same DBServer. and one thing i am able to connect to other DBServers which are in Lan..
please Help me.
View 1 Replies
View Related
Dec 6, 2006
Hi Folks,
Lets get this out of the way first - I KNOW NOTHING ABOUT SQL SERVER, MSDE or MDAC
Sorry I don't mean to shout but I really don't know anything at all so please make your answers as simple as possible.
I have an application (Webmarshall) that has a SQL database from which certain reports are run. Whenever I try to run the reports it asks me for database details.
According to the application it is using LANCELOTWEBMARSHALLWebmarshall as the database
As this is all happening on one server, I presume it is local and not remote.
When I am presented with the dialogue box for the reporting module it asks for a server and a database, I have tried the following :
Server: local Auth: Windows
Server: local Auth: SQL
Server lancelot (both authorisation methods)
Server: lancelotwebmarshall (both authorisation methods)
Server: \lancelotwebmarshall (both authorisation methods)
Each time, I get the message
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied
and I can't select a database.
Can someone help me please...its a long time since I went fishing in the dark (with no net) but thats how I feel right now!!!!
Thanks
View 3 Replies
View Related
Jul 20, 2006
Okay Ive managed to confuse myself pretty good.I have an aspx page that attempts to connect to an SQLEXPRESS instance and add data to a table.Code as follows:beginning of page<%@ page aspcompat=true enablesessionstate=false language=javascript %><!--#include file="adojavas.inc"--><%@ Import Namespace="System.Data.OleDb" %>I have a toolfunction that when called upon runs this:if (xco >= -180 && xco <= 180 && yco >= -90 && yco <= 90) { status = "Can't connect to database."; // create connection to database var connection; connection = Server.CreateObject("ADODB.Connection"); connection.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=OutdoorsExp;Data Source=\.pipeMSSQL$SQLEXPRESSsqlquery;"); status = "Can't access table."; // create recordset var recordset; recordset = Server.CreateObject("ADODB.Recordset"); recordset.Open("dbo.FishType", connection, adOpenDynamic); status = "Can't append new record, record set does not support AddNew."; // append record for clicked location if (recordset.Supports(0x01000400)) { status = "Can't append new record."; recordset.AddNew(); recordset.Fields("LongitudeI").Value = xco; recordset.Fields("LatitudeI").Value = yco; recordset.Update(); } recordset.Close(); // release the file connection.Close(); status = "Can't propagate changes to drawing."; // refresh drawing var document = mapserver.Document; var componentIndex = document.ComponentSet.ItemByName("FishTable Data Points Drawing"); if (componentIndex >= 0) { document.ComponentSet.Item(componentIndex).Refresh(); } status = xco.toString() + ", " + yco.toString(); }Unfortunately this gives me an error instead of transferring the value xco,yco to the SQL Tables LatitudeI/LongitudeI column.Ive tried many different connections strings, and have played myself into a state of confusion now :(.I get this error:[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.[COMException (0x80004005): [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.]Ive tried named pipes and using IP to connect, and Im not 100% sure how to use SQL Server via
"System.Data / System.Data.SqlClient".Any insights would be greatly welcomed!
View 3 Replies
View Related
Jul 25, 2005
I am trying to link SQL SE 2000 (Local server at head office) to MSDE 2000 (remote server). After creating the server group in local server, I try to register SQL server Computers (MSDE 2000) to place in it.
But I received this error message.
"SQL server registration failed because of the connect failure displayed below. Do you wish to Register anyway
SQL Server does not exist or access denied connectionOpen(Connect()).'"
I checked the setup for client and server utilities.
Client Utility is TCP/IP
Server Utility is Named pipe
Please, help me. I don't know what went wrong here.
View 9 Replies
View Related
Aug 24, 2006
The server that needs to be moved: SERVER A.
The databases which need to be moved (present in SERVER A): DB-A, DB-B.
The SERVER A machine is in X domain
The target machines: Could be any of SERVER T1
This machine is in Y domain.
While we are trying to create a new server instance of the Server A in SERVER T1, we are getting an error message as shown below:
Reason: SQL server does not exist or access denied. (ConnectionOpen (Connect())
The server that needs to be moved SERVER A could not be mapped to SERVERT1.
Problem: The tables concerned present in the SERVER A and the production server are same. These could be extracted to SERVERT1 using the SQL Enterprise Manager utility.
Views and Stored Procedures concerned are only present in SERVER A. Problem lies in copying them. Manually doing so could pose great risks.
What is the plausible work around for this?
View 2 Replies
View Related
Nov 26, 2005
Server Does Not Exist or Access Denied ConnectionOpen[Connect]
View 4 Replies
View Related
Oct 15, 2007
Hi frens
one of my site with the Databse workd fine while the other with the same database shows the following error:
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/Connection.asp, line 6
View 3 Replies
View Related
Oct 14, 2005
Hello!
When I start my .aspx with ASP.NET Web Matrix Server, it work, but when i try to start it with IIS I get error message.
TIA,
Misha
View 2 Replies
View Related
Apr 23, 2007
Hi,
I have a classic ASP app that loops through a record set and calls another query based on each record returned. Something like:
sSql = User Query
rsUser = conn.execute(sSql)
do while not rsUser.eof
sSql = Select [Type] From [User Types Display] Where UserId = rsUser(€œUserid€?)
rsType = conn.execute(sSql)
€˜ Put information into HTML table
rsType.Close
rsUser.MoveNext
loop
In general, at around 3575-4000 loops, the system kicks back :
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
UserList.asp Line 300
I get no error message in the SQL Server Logs (according to the server, nothing happened), just this message on my ASP page. This happens about 90% of the time. 5% it runs completely, the other 5% bombs after 1-100 loops.
This only started happening when we took our app from a local Server 2000/SQL 2000 setup to separate Server 2003/SQL 2005 setup.
In SQL Profiler I see the loops hitting with only two reads per batch (TCP/IP). This seems very low compared to named pipes (when in a local server configuration) reads of 15-30 reads per batch.
I know it is not a hardware issue; this behavior is observed in both our test and production environments. All of our other ASP page queries work fine, just the 2 or 3 of hundreds that loop like above. cause the error.
Client Details (as best I could):
Connection String (in .inc file): conn.Open "Provider=SQLOLEDB;Network=DBMSSOCN;Data Source=10.0.1.100;Initial Catalog=€™TestDB';User ID='XXXX';Password='XXXX'"
The Client is Remote to the SQL machine and connects through TCP/IP only.
I force no encryption on the back and forth between the servers.
Server Details:
SQL Server 2005 Standard with SP1
Only Named Pipes and TCP/IP are enabled
I think this is all the info relative to my issue.
Thank you so much for any help,Smith
View 9 Replies
View Related
Apr 10, 2007
Hi!
I understand that this topic is one of the most discussed topics ever. However i could not find the relevant information after going through (almost) all the posts so far. Hence this post. I am getting the 'SQL Server does not exist or access denied' error when I am trying to access SQL Server from a WINDOWS SERVICE. SQL Server and the Windows service are running on two different machines. (When they are on the same machine, it works). All the solutions I found so far are related to web apps. What should I do in the case of a windows service? My connection string uses SQL server authentication. (I tried with windows authentication. Its not working either.). Under what login does windows services run and how can I add it to valid SQL server logins?
View 3 Replies
View Related
Jul 26, 2007
Hi,
when I was sending 50 simultaneous connections to the web services, I got these 2 errors:
- "1[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. "
- "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 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)"
Everything worked fine if I ran 10 simultaneous connections. I am using Microsoft ACT to load test the web service. The database is SQL Server 2000. Any idea about why this is happening?
Appreciate your help! Thanks!
Jason Zhu
View 3 Replies
View Related
Jun 6, 2007
Hi,
When I am trying to access SQL Server 2000 database from another machine i got this error
Server: MSg 17, Level 16, State 1 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied
but I could access the database on same server and in that server i could access other databases in different server.
View 6 Replies
View Related
May 5, 2004
Hi,
Over the last couple of years on my development machine, I occasionaly received the error:-
'SQL Server does not exist or access denied.'
when testing my web app. All I had to do was stop SQL server and restart it and the problem would go away.
Unfortunately i'm now getting the error everytime, and no amount of stopping/restarting SQL Server makes any difference. I can make remote connections ok, just can't make any local ones.
Can anybody help with this please?
Thanks,
Bernie
View 11 Replies
View Related
Oct 1, 2007
I have been having problems after I make a connection from my application to a SQL Server 2005 database that is located on a different machine. After a few minutes it gives me the SQL Server Does Not exist or Access denied message. I am able to connect to it through SQL Server management studio. I am doing some data intensive operations by copying data from different tables on the remote server onto text files on my local machine. Any suggestions?
View 16 Replies
View Related
Aug 29, 2006
Ok so I'm using the Management Studio Express and was able to log in and get into the database server, but I had to click the "options>>" button and change database I wanted to connect to from <<default>> to my database on the server or else I get the "cannot open user database, login failed" error message.Then I right click my database and it gives me the "Cannot open user database. Login failed" error message, even though I already connected to the database to login during the connect screen. Also I'm able to interact with the database using SQL QUERIES in the Management Studio, like adding new tables with it, but if I right click the database and click "add table" I get that error.What gives? I know I have permission since I was able to log on, and modify the database using SQL queries but if use the GUI I can't use it. I can't even right-click select "properties" without getting that error. The reason I want to use the GUI is because I want to right click and use the backup feature of the database.My guess is that Management Studio continues to point to the default database(which gives me that message) after I already logged in, so I have no idea how to change the default database that management studio points to, to the one I do have permission to use. Thanks in advance.
View 1 Replies
View Related
Sep 17, 2007
Hi,
I'm trying to connect to my local database running on SqlServerExpress. I'm able to connect to it from SQL Server Studio. I'm also able to create a data connection to the database from VS.NET 2005 using server explorer. However, when I try to pull some data from my code, I get the "SQL Server does not exist or access denied." error.
Here's my code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="true" DataSourceID="SqlDatasource1" /><asp:SqlDataSource ID="SqlDatasource1" runat="server" SelectCommand="select * from tStates" ProviderName="System.Data.OleDb" ConnectionString="Provider=SQLOLEDB;Server=.SQLSERVEREXPRESS;database=TestaDB;uid=sa;pwd=SAPassword" />
I'd appreciate some help on this.
View 1 Replies
View Related
Nov 15, 2003
Hi guys,
I just installed WebMatrix and MSDE (downloaded from www.asp.net), and I have set MSDE to use SQL authentication. I have granted user ASPNET read/write previlege and added it to the MSDE user's table. When I tried the following code, it gives me this error: "SQL Server does not exist or access denied."
<%@ Page Language="C#" Debug="true" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">
void Page_Load(object sender, EventArgs e) {
// TODO: Update the ConnectionString and CommandText values for your application
string ConnectionString = "server=(local)/BERKELEY;database=emonopoly;Trusted_Connection=yes";
string CommandText = "select * from test";
SqlConnection myConnection = new SqlConnection(ConnectionString);
SqlCommand myCommand = new SqlCommand(CommandText, myConnection);
myConnection.Open();
DataGrid1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
DataGrid1.DataBind();
}
</script>
<html>
<head>
</head>
<body style="FONT-FAMILY: arial">
<h2>Simple Data Report
</h2>
<hr size="1" />
<form runat="server">
<asp:datagrid id="DataGrid1" runat="server" CellSpacing="1" GridLines="None" CellPadding="3" BackColor="White" ForeColor="Black" EnableViewState="False">
<HeaderStyle font-bold="True" forecolor="white" backcolor="#4A3C8C"></HeaderStyle>
<ItemStyle backcolor="#DEDFDE"></ItemStyle>
</asp:datagrid>
</form>
</body>
</html>
I turned on the debug option, and the exact output is this:
Server Error in '/' Application.
--------------------------------------------------------------------------------
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied.
Source Error:
Line 13: SqlCommand myCommand = new SqlCommand(CommandText, myConnection);
Line 14:
Line 15: myConnection.Open();
Line 16:
Line 17: DataGrid1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
Source File: D:PersonalProjectsMS.NeteMonopolysourcedatareport.aspx Line: 15
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +311
System.Data.SqlClient.SqlConnection.Open() +383
ASP.datareport_aspx.Page_Load(Object sender, EventArgs e) in D:PersonalProjectsMS.NeteMonopolysourcedatareport.aspx:15
System.Web.UI.Control.OnLoad(EventArgs e) +55
System.Web.UI.Control.LoadRecursive() +27
System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
The strange thing is I'm able to connect to the MSDE database from the DATA window on the right hand side of the WebMatrix design window. Will somebody give me a hand?
And yes, I did make sure the MSDE is running.
Thanks alot
Chris
View 2 Replies
View Related
Jul 4, 2005
I have re-installed Visual Studio and SQL Server and now i am getting this error for all applications i try to runError:"
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ResNet2.top_animals.BindGrid() +64
ResNet2.top_animals.Page_Load(Object sender, EventArgs e) +525
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
"any suggestions?
View 10 Replies
View Related
Oct 4, 2005
I'm trying to create to set up connection between my web application on the server and
the database on another box and getting "SQL Server does not exist or access denied" error.
Both the web server and the database machine are Windows 2003 Server, there's no firewall
enabled, there's mixed authentication enabled on the sql server. The machines are not on the
same domain so I'm using SQL Server authentication from web.config. Here's my connection string:
<add key="ConnectionString" value="Server=sqlboxip;User id=sqlaccountname;Pwd=sqlpass;Initial catalog=dbname">
I've also got <identity impersonate="true"> set in web.config.
Had it the connection working at some stage but then with more tweaking and app reinstall
back square one... Please help!</identity></add>
View 4 Replies
View Related
Dec 17, 2005
I have built a web application that runs on my local web server against my local SQL server and my development server, but now I'm trying to get it to work on the live server and I'm not getting a connection. Whenever I try to open the connection, I get a.
SQL Server does not exist or access denied.
error.
Here is my connection string...
Public connString as string
Dim SQLServer As String = "xxx.xx.xx.xxx"
connString = "server=" & SQLServer & ";" _
& "database=DBName;Trusted_Connection=No;user id=xxxID;password=xxxPassword;"
myConnection2 = New SqlClient.SqlConnection(connString)
------------------------------------------------------------
I'm starting my connection to run a datareader this way...
Dim strSQL As String
strSQL = "SELECT ClientID, ClientName " & _
"FROM Client; "
' Create a connection to the table in the SQL database located on
' the remote computer.
Dim myCommand2 As New SqlClient.SqlCommand(strSQL, myConnection2)
myCommand2.CommandTimeout = 1200
myConnection2.Open() 'HERE IS WHERE THE ERROR OCCURS
Dim myReader As SqlClient.SqlDataReader = myCommand2.ExecuteReader(CommandBehavior.CloseConnection)
While myReader.Read()
---------------------------------------------------------------
I can communicate with the server with no problem from my local computer. I can ping the server, and I also tested it by creating a system DSN using the login and password in my application, and it finds the database with no problem. I've tried to connect using the SQL Server's server name and the IP address and both return the same result. I've also saw something in another post to set the trusted connection parameter to "yes" and that didn't work either.
I'm developing on a Windows XP Professional and I'm trying to connect to a Windows 2003 Server with SQL Server 2000 installed on the machine.
I did add the database by restoring a backup from my local server onto the live server. I don't think that should matter, but maybe it does. If anyone has any ideas, I would greatly appreciate it.
View 4 Replies
View Related
Oct 31, 2006
hello , i'm very new to sql server.
i'm using sql server 200 & winXP. I have a local server called "JO" and a dsn named "LocalServer".
Authentication is sql server authentication & window with username of "cying" and password "admin"
i can ping my server "JO" but cannot telnet it's sql_server_tcp_port.
this is the error code i obtained when try to open the connection:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
my connection string is as below :
set objcon = server.CreateObject("ADODB.Connection")
strConnection = "Provider=MSDASQL;Driver={SQL Server};Server=local;Data Source=LocalServer;User ID=cying;Password=admin;Persist Security Info=False"
objcon.open, strConnection
is there anything wrong with my connection string or setting?
pls help, thanks in advance
View 4 Replies
View Related
Oct 31, 2007
My connection string is :
server=localhost;Database=INFOSEC;Integrated Security=true
It works for the login page, but it does not work for the registration page, and give the "SQL Server does not exist or access denied." error.
Any IDEA?
View 1 Replies
View Related
Oct 29, 2007
Dear all,
I developed an asp.net application by using .net frame work 1.1 and sql server 2000.
i was using 2 tier arch (database server is different and web server is different).
my problem is , connection to sql server is not stable,some times it works and some times
it raises error that sql server does not exist or access denied.please help me to solve this problem
View 1 Replies
View Related
Mar 22, 2006
Hello everyone.
I am trying to install Project Server, and i'm having issues with sharepoint, and connecting to SQL:
dataserver is running sbs2003 sql2003 and analsys services.
server2 is running server2003 is to be the application server for project.
ProjectDb is the database that i have setup in sql.
username is the account that can control everything as administrer.
in Sharepoint is asks for the database server: <<dataserver>>
SQL Server database name: <<ProjectDb>>
I'm using windoes authentication and then i click ok, and get the error message.
I've also see the error message can not find the SQL Server, and access denied. Under ODBC i have installed the sql server information under System DSN.
Any help would be great.
Thanks
Everett Buel
View 3 Replies
View Related
Mar 28, 2005
hi,
I have an asp.net application which queries an sql server in some other domain and populates a grid with the results.
i am using sql server authentication and my connection string is as follows:-
Dim connectionString As String = "server=emr01; user id='private'; password='private'; database='NGEMRDev'"
i have also used the following tag in web.config:-
<identity impersonate="true" />
This works fine on my development pc i.e windows xp with sp2 .
but when i tried running the same application in windows 2003 the query gives the following exception:-
Server Error in '/TempDel' Application.
SQL Server does not exist or access denied.
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: SQL Server does not exist or access denied.Source Error:
Line 77: dataAdapter.SelectCommand = dbCommand
Line 78: Dim dataSet As System.Data.DataSet = New System.Data.DataSet
Line 79: dataAdapter.Fill(dataSet)
Line 80:
Line 81: Return dataSetSource File: c:inetpubwwwroot empdelemrtempdel.aspx Line: 79 Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
ASP.EmrTempDel_aspx.MyQueryMethod(String username) in c:inetpubwwwroot empdelemrtempdel.aspx:79
ASP.EmrTempDel_aspx.Button2_Click(Object sender, EventArgs e) in c:inetpubwwwroot empdelemrtempdel.aspx:89
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +58
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Please help me as to how do i successfully implement my application in the windows 2003 server. i have given the aspnet user on the win2003 admin rights.
View 4 Replies
View Related
Nov 10, 2003
Hello
please assist me I will appreciate it
I have a problem in my scripting I gues,I "ve done the config and server registrations and allow a public permission ,but stil giving me trouble
well this is my coding:::::::
<
<script language="vb" runat="server">
Dim MyConnection As SqlConnection
Sub Page_Load(Sender As Object, E As EventArgs)
MyConnection = New SqlConnection("server=(localHost);Database=CampusLANDB;Trusted_Connection=yes")
If Not (IsPostBack)
Dim DS As DataSet
Dim MyCommand As SqlDataAdapter
MyCommand = New SqlDataAdapter("Select distinct State from Authors",MyConnection)
DS=New DataSet()
MyCommand.Fill(DS,"tStudents") ' This is where the pro underlies
MySelect.DataSource=DS.Tables("Name").DefaultView
MySelect.DataBind()
End if
End Sub
sub GetName_Click(Sender As Object,E As EventArgs)
Dim SelectCmd As String = "Select From tStudents Where Name =@Name "
Dim DS As DataSet
Dim MyCommand As SqlDataAdapter
MyCommand = new sqldataAdapter(SelectCmd, MyConnection)
MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@Name",SqlDbType.VarChar,2))
MyCommand.SelectCommand.Parameters("@Name").Value = MySelect.Value
DS= new DataSet()
MyCommand.Fill(DS,"tStudents")
MyDataGrid.DataSource=DS.Tables("tStudents").DefaultView
MyDataGrid.DataBind()
End sub
</script>
and I will apreciate if anyone vcan help me urgently
PPM
View 3 Replies
View Related
Jun 20, 2006
I have two sql server 2000 with mixed mode authetication. I stand at one server and setup a linked server to the other using the same user id and password.
However when I click to the Tables icon of linked server in Enterprise manager, there is an error message:
Error 17 SQL Server does not exist or access denied.
And It does not show any table.
I register remote sql server in Enterprise manager fine.
Could any one help me ?
Thanks.
View 14 Replies
View Related