Error Connecting To Database
Mar 10, 2007Hi guys,
I created a database using SQL Server EXpress edition but now i need to use SQL Server Development edition. I cant connect to the database now?
Anyone tell me what the problem is.
Hi guys,
I created a database using SQL Server EXpress edition but now i need to use SQL Server Development edition. I cant connect to the database now?
Anyone tell me what the problem is.
When i am trying to connect to SQL Server(Express edition) on production server i am getting 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: TCP Provider, error: 0 - No such host is known.)" My SQL connection string is like this which i wrote in web.config.
<add key="conn1" value="Data Source=xxx.xxx.x.xxxyz,1433;Initial Catalog=abcdef_xyz;persist Security Info=true;User ID=xx;Password=xxxxxx"/>
string constr = ConfigurationManager.AppSettings["conn1"]; SqlConnection con = new SqlConnection(constr);
con.Open();
When i searched microsoft help to resolve this error, it suggested me to enable TCP/IP protocol for SQL server, i did that, but even after doing that i am still not able to connect to the database. Could any one please tell me what else i need to configure in order to connect to the database.
Thanks
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)
How do I correct it?
Hi Again,I have MSDE on ASP1.1 on a PC and have a logon page that uses a stored procedure to check my auth_user table, if logon and password exist then it returns (1) else returns (0).I used objparams.return to pick up the returned value and either server.transfer to opening page or label text message 'login not valid'. This is insde a try and the catch is another label, 'cannot connect to database'.Running on my local PC all is fine, transferred SP and table to hosting server, along with web.comfig set to the host servername, uid, password and database. On the host server all errors messages are returned. I have created a connection in my VS7 database manager to the remote host and the same happens after amending my connection string to run on the remote server.It clearly is the connection string, I am using the <appsettings> add Key to connect as I thought it would mean no change of coding in my pages when moving from Dev PC to Server. I have checked the hosting server setup and used the server name associated with the database (mssql3.securedc.com) , checked uid, password and database settings. Is there something I have missed like permissions, specific security settings on the host server (I have to go through a third party as the hosting is done through a friend of my client)?? Many thanksEarle
View 2 Replies View RelatedHi there
i have a problem connecting creating a data source to SQL server express.
I am running winXP with service pack2
My machine is APOLLOSQLEXPRESS
i AM USING AN ODBC CONNECTION.
i GET THE FOLLOWING ERRORS:
SQL SERVER ERROR 1231
AND
SQL SERVER ERROR 17.
Having done a google search and looked at the local security settings i am not sure what to add to the object names.
Can anybody please help.Gino
I've remoted into our domain controller which houses our SQL database. From there I've been using the Microsoft SQL Database manager to run queries. However, I would prefer to do this from my desktop and not have to remote in whenever I need to look something up. I've found that Microsoft Visual Studio Express 2013 can create a connection where I can do my work. I've created the connection (or I believe so). "Testing the connection" is successful and in the Database Explorer window I can see my database and the folders of tables, views, etc. However, all of these folders are empty..When I choose the database everything in the settings pops up and I use the same authetication I use on the domain controller..
View 4 Replies View RelatedHi
Am developing a web application in asp.net ,c# and Sql server 2005(management studio express). Am using VS 2008 version. Getting the following error while connecting to database.
plz help me
"Cannot open database "Form" requested by the login. The login failed.
Login failed for user 'SUNS-97A7CC82A0Suns Solutions'."
Thanks in advance
Dear All,
I am trying to connect to a .sdf database. I am building a console application. First I got an error "Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". Then I manage to solve "Unable to load DLL 'sqlceme30.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)". So wat is the possible error on my side ?
Hi,
I am getting the following error when i am trying to connect to the database server installed on different box.
"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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
When i searched google, some postings suggested to enable the TCP/IP and Named Pipes Protocols from SQL Server configuration Manager. I did so and also ran mofcomp command. But even after doing this i am not able to connect to the server. Following is my connection string.
<add key="conn2" value="Data Source=xxxxxxxx;Initial Catalog=xxxxxx_xxxxxx;User ID=xx;Password=xxxxxx;"/>
Could any one please tell me what else the configuration settings i need to do in order to connect to the database from my application.
Hello,
I'm tyring a simple piece of code to conenct to my database: SqlConnection con = new SqlConnection("Data Source=localhost; Initial Catalog=OrderingSystem; Integrated Security=SSPI");
try
{
// Try to open the connection.
con.Open();
label1.Text = "<b>Server Version:</b> " + con.ServerVersion;
label1.Text += "<br /><b>Connection Is:</b> " + con.State.ToString();
}
catch (Exception err)
{
// Handle an error by displaying the information.
label1.Text = "Error reading the database. " + err.Message;
}
finally
{
// Either way, make sure the connection is properly closed.
// Even if the connection wasn't opened successfully,
// calling Close() won't cause an error.
con.Close();
label1.Text += "<br /><b>Now Connection Is:</b> " +
con.State.ToString();
}
When I try this, I get an error:"Error reading the database. Cannot open database "OrderingSystem" requested by the login. The login failed. Login failed for user 'NT AUTHORITYNETWORK SERVICE'."
The strange thing is, this code works perfectly If I use it in a Windows Forms application.
Is it a problem with SQL server, IIS or my code?I'm using SQL Server 2005 (SP2) 32bit developer edition + IIS 6.0 + Visual Studio 2008 Pro all runnign on my Windows XP x64 PC.
Thankyou
I have been successfully using SQL Server 2005 developer
edition for a couple of months now. However,
when I started Microsoft SQL Server Management Studio this morning I could not
connect to the €śDatabase Engine€? (I€™m using Windows Authentication). I can still connect with the €śIntegration
Services€? and €śAnalysis Services€? on the same server. The server running on my local machine, so
there shouldn€™t be any problems with the network. I am also able to connect with it through
ODBC, it just seems to be the Server Management Studio which can€™t connect, and it only has
problems with the €śDatabase Engine.€? Any
help would be appreciated.David
The detailed error message says:
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.)
(.Net SqlClient Data Provider)
------------------------------
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10061&LinkId=20476
------------------------------
Error Number: 10061
Severity: 20
State: 0
------------------------------
Program Location:
at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,
Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)
at
System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner, String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection
owningObject, Boolean aliasLookup)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)
at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
at
System.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo
ci, IServerType server)
at
Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()
Hi everyone, i have already created posts about this problem and im aware theres millions of replys, but i still cant get this to work and its driving me mad. The posts i have seen i dont understand?
Im using the standard ASPNETDB Database, i have never opened up SQL Server Management studio, although i do have the express edition.
i have tried everything and i am totally stumped as to what to do. Heres my web.config.
It works in VWD 2005 Express, but not in WWWROOT or on webserver?
PLEASE PLEASE PLEASE Can someone help me!!!!!!!!!
Dan :)
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings/>
<connectionStrings>
<add name="northwindsConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="ConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|MyDatabase.mdb;Persist Security Info=True"
providerName="System.Data.OleDb" />
</connectionStrings>
<system.web>
<profile>
<properties>
<add name="FullName" defaultValue=""/>
</properties>
</profile>
<roleManager enabled="true" />
<compilation debug="false" />
<authentication mode="Forms" />
</system.web>
</configuration>
when i am running both sql server management studio and beb developer and i try to connect to a database in web developer simultaneously it gives me errorfile used by another process file located on UNC sharebut if i am only running web developer it gives me no errorso please tell me how to connect to a same database simultaneously
View 1 Replies View RelatedNewbie strikes again.. I'm attempting to connect to a SQL Server database (using VS 2005). My code generated no errors in the build but when I tried to access the database, I got the following message:"The ConnectionString property has not been initialized."My connection string is stored in my web.config file. My code goes as follows:Dim strSQL As String = "SQL string stored here"Dim objConnection as SqlConnection = New SQLConnection(ConfigurationManager.AppSettings("name of connection string is here"))Dim objCommand as SQLCommand = New SqlCommand(strSQL, objConnection)objConnection.Open()Then I go on to open my reader and such. Where should I be initializing the ConnectionString property?TIA,Lesley
View 1 Replies View RelatedI've got code that on my own machine (visual studio .net 2003 and iis and sql server all exist on this box) works great. I display my test page, which loads a dropdownlist on page_load. This works great on my own machine.
When I move the code to our dev environment. Web server and database servers on separate boxes. I get the error "Object reference not set to an instance of an object" when i try to open the connection to the database. I thought it had to do with permissions and I check all through sql server and everything looks great. I then thought it was the connection string. I still haven't ruled this out, but I wrote a quick vbscript app to attach to the database and try to pull a record. The vbscript worked fine. So, the code works fine on my computer, but not on the web server. The connection does work with vbscript, but through my asp.net web app I get the "object reference" error.
All code below...
ASP.NET webpage:
private void Page_Load(object sender, System.EventArgs e)
{
if( !IsPostBack )
{
// Create a command object for the query
string mySelectQuery = "select id from vw_abcd order by ID";
SqlCommand myCommand = new SqlCommand(mySelectQuery,sqlConnection1);
sqlConnection1.Open();
DropDownList1.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
DropDownList1.DataBind();
sqlConnection1.Close();
RangeValidator1.MinimumValue = "1";
RangeValidator1.MaximumValue = DropDownList1.Items.Count.ToString();
}
}
Connection string on my machine:
workstation id=wXXXXXX01;packet size=4096;user id=testuser;password=testpass;integrated security=SSPI;data source=wXXXXXX01;persist security info=False;initial catalog=TestDB"/>
Connection string on web server:
network library=DBMSSOCN;data source=xxx.xx.xxx.xxxinstance1;user id=testuser;password=testpass;initial catalog=TestDB
vbscript:
Dim connConnection, rstresultset
strConnectionString = "driver={Sql Server};server=xxx.xx.xxx.xxxinstance1;user id=testuser;password=testpass;database=TestDB"
Set connConnection = CreateObject("ADODB.Connection")
connConnection.Open strConnectionString
Set rstresultset = createobject("ADODB.Recordset")
rstresultset.ActiveConnection = connConnection
rstresultset.Open "select id, comment from testtable", connConnection
msgbox rstresultset(0)
msgbox rstresultset.Fields(0).Value
Error message and stack trace:
Object reference not set to an instance of an object.
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at Web2.Drilldown.Page_Load(object sender, System.EventArgs e)
Any ideas what's going on?????
I have an IPAQ 2795 and installed a program that emulates Enterprise
Manager on a Windows Mobile Device called SEM v1.01 from
Trianglepowers.com
http://www.trianglepowers.com/ppc6700/Default.aspx
I have installed the latest Net Compact Framework and service patches / updates
I have installed MS SQL Mobile Edition
I have installed Client CAB
But I still get this error when I try to run the program.
Can anyone suggest a solution?
Thanks
I've run into a bit of a database connection problem. I'm trying to connect to a SQL Server database. It compiles okay, but then while IE is loading, I get an exception error pointing out in the code saying 'Keyword not supported: 'provider'.
View 2 Replies View Related
I've had some problems with Reporting Services and getting connected to the database server after configuration. I am now getting the following error message:
The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable) (rsRPCError)
In my Database Setup everything runs fine when I click apply except for the Setting Connection Info for Reporting Server this has a yellow triangle with a ! and says that the report server cannot access internal information.
I also have not been able to Initialize as there are no instances to initialize and none are created when I go through setup. Is there something I need to delete from the registry or the file system that does not get removed upon uninstall?
Thanks.
Emily
I have moved my databases to 2000 to instance of 2005 on the same server.
Now i set databases offline in 2000 as i did upgrade use backup & recovery method.
& my connection string
Password=test;Persist Security Info=True;User ID=test;Initial Catalog=databasename;Data Source=ipaddress
i was using above connection string to connect when using 2000 databases form applications in the production machine
I get the following error when i am running my applications now after moving to 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)
IS it because i have two server on one server or
What do i need to do in order to fix this....tried several thing by searching nothing worked out..
Let me know
thanks
Hello,
i tried to connect to a SQL Server Compact Database (version 3.5) with SQL Server Management Studio Express (Version 9.00.3042.00).
But i get the follwing error message (sorry, it's a german message):
.....................................
Es kann keine Verbindung mit 'D:DocumentsVisual Studio 2008Projects\_ProduktivSuperkalibrator_PrototypenSuperkalibrator_PrototypenDatenbankDatabaseTest.sdf' hergestellt werden.
------------------------------
ZUSĂ„TZLICHE INFORMATIONEN:
Sie versuchen, auf eine ältere Version einer Datenbank von SQL Server Compact Edition zuzugreifen. Falls es sich um eine Datenbank von SQL Server CE 1.0 oder SQL Server CE 2.0 handelt, führen Sie 'upgrade.exe' aus. Falls es sich um eine Datenbank von SQL Server Compact Edition 3.0 oder höher handelt, führen Sie die Komprimierung und Reparatur aus. [ Db version = 3505053,Requested version = 3004180,File name = D:DocumentsVisual Studio 2008Projects\_ProduktivSuperkalibrator_PrototypenSuperkalibrator_PrototypenDatenbankDatabaseTest.sdf ] (SQL Server Compact Edition ADO.NET Data Provider)
.....................................
Is there a solution to manage Compact Databases in Version 3.5?
Thanks!
Stefan Wagner
Hello,
I recently joined a company that is having an issue connecting to SQL Server Integration Services on one of their production servers. When trying to connect via management studio, both locally and remotely, they receive the error below. The server is a 64 bit server and is using third party replication (Veritas).
It sort of sounds like the issue described in this knowledge base article: http://support.microsoft.com/kb/919224. However, we do not have a problem creating maintenance plans. I'd just give it a shot but its a production server and getting approval to do anything that modifies the registry with the registry replication setup is a pain, so I'd like to determine if there could be another cause first.
TITLE: Connect to Server
------------------------------
Cannot connect to ***************.
------------------------------
ADDITIONAL INFORMATION:
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) (Microsoft.SqlServer.DTSRuntimeWrap)
------------------------------
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) (Microsoft.SqlServer.DTSRuntimeWrap)
------------------------------
BUTTONS:
OK
------------------------------
Hi all,
In the VB 2005 Express, I can get the SqlConnection and ConnectionString of a Database "shcDB" in the Object Explorer of SQL Server Management Studio Express (SSMSE) by the following set of code:
///--CallshcSpAdoNetVB2005.vb--////
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Public Class Form1
Public Sub InsertNewFriend()
Dim connectionString As String = "Data Source=.SQLEXPRESS;Initial Catalog=shcDB;Integrated Security=SSPI;"
Dim connection As SqlConnection = New SqlConnection(connectionString)
Try
connection.Open()
Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)
command.CommandType = CommandType.StoredProcedure
.......................................
etc.
///////////////////////////////////////////////////////
If the Database "shcDB" and the Stored Procedure "sp_inertNewRecord" are in the Database Explorer of VB 2005 Express, I plan to use "Data Source=local" in the following code statements to get the SqlConnection and ConnectionString:
.........................
........................
Dim connectionString As String = "Data Source=local;Initial Catalog=shcDB;Integrated Security=SSPI;"
Dim connection As SqlConnection = New SqlConnection(connectionString)
Try
connection.Open()
Dim command As SqlCommand = New SqlCommand("sp_insertNewRecord", connection)
command.CommandType = CommandType.StoredProcedure
........................
etc.
Is the "Data Source=local" statement right for this case? If not, what is the right code statement for my case?
Please help and advise.
Thanks,
Scott Chang
Hi all,I come up with a problem aleady discussed in some posts especially in the post http://forums.asp.net/t/1235761.aspx. but I got in not finally solved.The main problem is connecting to a database twice which causes errors. So I think this might be the right place to ask my questions. Here ist the problem in short:I'm using VWD on XP-Professional with SQL-Server Express and Reporting Services Express. All with Windwos Integrated Security and User Instance (SQLExpress). In my web-application I had for all Datasources the connect string:Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|mydatabase.mdf;Integrated Security=True;User Instance=True This works fine so far. I also have Reports designed with the Report designer using the same connection string. I can preview the reports and I deployd thre reports successfully. I want to call these report using a report viewer web control.Now the problem:when I call the remote remote report from my web-application, the database cannot be opened because an other process is using the database (see post mentioned above). It seems that this is a problem with attaching the database twice: from the sql-server and from the report-server.So I used now a new connection string without "attaching" the database (in vwd and in report designer):Data Source=.SQLExpress;Initial Catalog=C:inetpubwwwrootmyappAPP_DATAmydatabase;Integrated Security=True Now everything works...but ... only on my machine. On the production machine this does not work. I wonder anyway, why its working on my machine, because I never "attach" the database (there is no connection string with AttachDbFilename and I have not opend the developer and have not opened the sql management studio).On the production machine the concurrent (SQL-Server and Report-Server) connection to database does not work with either connection strings, no matter if i attach the database with sql server manager or not).This all drives me crazy for days now. All I want is to use SQL-server and Reporting- Services with its nice features and not repairing my tools. I thought I have a standard Installation, nothing special, but the standard obviously makes problems.Here finally my question:Does this environment ( web-application with remote reports) with Express edition cause normally no problems?Can I "attach" a database only once? How should I connect with my web application that uses the sql-server connections and also the report-server-connections (attaching twice does not work).What connection strings to use and when (AttachDbFilename or Initial Catalog).Are these problems specific to the Express Editions? I thank you in advance for any help Dieter
View 2 Replies View RelatedHey all,I am new to ASP.NET. While executing a simple code , i got the error: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.Whats wrong? RegardsYasir
View 1 Replies View RelatedI'm trying to connect to an SQL server, but I'm unable. It suggests this is because SQL server does not allow remote connections, and points me to the named pipes provider, error 40 Could not open a connection to SQL server.
I am running SQL express service pack 2 under Vista. I am a member of SQL administrators (set during installation).
Under the SQL Server Configuration manager, SQL server and Browser are running, the protocols for sqlexpress and the native client have enabled shared memory, named pipes, and tcp/ip.
I tried removing and creating a new database. Now it sits under the database Engine section of Management Studio Express, with a white circle on the database icon. When I try to connect to this database, using either windows authentication or sql server authentication, it fails.
What else is there to try? If there was a troubleshooting guide, that would be helpful.
I downloaded an ASP.NET web application from the web to learn the .NET framework. I was successful in running the website on my laptop using ASP.NET Development Server that comes with Visual Studio 2005. My laptop is running Windows XP Professional and SQL Server 2005. I am now trying to do the same on my desktop computer running Windows Vista; however, for some reason i am getting an error when the website tries to connect to the DB. Here are the steps i have followed so far:1. I tried to configure the website DB connection the same way i configured it on my laptop. Basically I use the following connectionStrings: <connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings>2. That same connection string worked fine on my laptop. But I got the following error on my desktop: 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)I am wondering if the error is related to Vista. When i try to connect to that DB using SQL Management Studio via Windows Authetication and do not run it as Administrator then I cannot connect to the DB. In other words, only when i run SQL Management Studio as administrator i am able to use Windows authentication to connect to that DB.3. Next, I tried creating a SQL login. I made sure I can use that login to access the DB directly using SQL Management Studio. In addition, I changed the database to allow "Local and remote connections" "Using both TCP/IP and named pipes".4. Changed the connectionStrings in web.config to: <connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=TheBeerHouse;Integrated Security=False;uid=*****pwd=****" providerName="System.Data.SqlClient"/> </connectionStrings> Obviously, the actual connectionString has the actual user name i created and the correct password instead of (*) asterisks.5. And once again, I got same error as above Any help will be appreciated!
Greetings, eveybody.
While attaching a sql db to a sqlDataSource, an error is poping up, stating that "the db is currently accessed by another process, the connection will be closed".
Plz put some light on this.
Thanking you,
Sankar.
Hi everyone,
I am learning how to use .NET and MSDE. I am working out of the book "ASP.NET Unleashed" on the Job Site (Chap 30)
I have used osql to run the .sql script, but now I am having problems connecting to the DB; I get "SQL Server does not exist or access denied"
The web.config file is:
<configuration>
<appSettings>
<add key="constring"
value="Server=localhost;UID=AspNETJobsUser;PWD=secret;Database=AspNetJobs" />
</appSettings>
<system.web>
<authentication mode="Forms" >
<forms name=".ASPNETJOBS"
loginUrl="/aspnetjobs/site/password/login.aspx" />
</authentication>
</system.web>
</configuration>
My computer is running in Windows Authentication Mode.
I have tried replacing the UID and PWD to my sa account settings, but I still can not connect.
The books says I need to manually add a login that has access to the AspNETJobsDatabase, but I assume that would be the sa login or do I need to create another all together? If so, can anyone suggest an article to lead me in that direction.
Any suggestions would be helpful and greatly appreciated.
Thanks
I have an asp.net project on my laptop 'supposed to be' connecting to a SQL DB on the same machine. But I keep getting this error:
System.Data.SqlClient.SqlException: Cannot open database requested in login 'ASPState'. Login fails. Login failed for user 'xyz'.
It's driving me nuts. Any help would be appreciated.
txs
sonners
Hi,
I have a major problem here. Hope you guys can help.
I have a VS2005 project that uses a DB I developed on and MSDE database using TOAD for SQL. A while ago I upgraded to SQL Server Express and all was well.
Next I was looking to create a deployment package for both the application and BD so after a bit of reading I created a connection to the DB in my VS2005 project with the intention of making it a dependency so both app and DB could be installed in one go (maybe not the best idea L). Previously I had just been using a connection string and opening/closing the connection as and when it was needed (this app only runs for 5 minutes each night).
This however has now stopped the ability to connect to the database with any of my DB development tools (Toad and the SQL management app that comes with express).
When I try to connect I get the following error
TITLE: Microsoft SQL Server Management Studio Express
------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)
------------------------------
CREATE FILE encountered operating system error 32(The process cannot access the file because it is being used by another process.) while attempting to open or create the physical file 'C:Program FilesMicrosoft SQL ServerMSSQLDataCDEvolution.mdf'. (Microsoft SQL Server, Error: 5123)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=08.00.0760&EvtSrc=MSSQLServer&EvtID=5123&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
I had a look at the connection string that VS2005 is using and it looks nothing like the standard connection string I was using previously. It seems that the action of creating the connection with VS has changed/corrupted something on the DB.
To ad to my woes I also have to either change the connection string (this built using an xml file containing the all the elements of the string and parsed in allowing be to edit the string depending on the environment) to match the one VS is using or change my code to use the new connection.
I would prefer to revert back to the way it was working previously and figure out a different method of deploying the software.
Any thoughts?
Cheers,
Kevin.
Dear All,
I've created a new database for our new project, taken the scripts from VSS, as there is no error in the scripts, i've run the scripts and everything is fine with sql server 2000.
but while i'm trying to connect to the database from 2005, it is getting error....as the database 'db086' is not accessible.(microsoft.sqlserver.express.objectexplorer).
what will be the cause???
i'm working fine with the database with sql server 2000.
Vinod
Even you learn 1%, Learn it with 100% confidence.
iis and sql on same box. asp lan app.I can open the initial page but get this error when i try to look upacustomer or other db dependant actions.Microsoft OLE DB Provider for SQL Server (0x80040e4d)Login failed for user 'sa'/ctservice/view_edit_service/getindex.asp, line 22the code on line 21-22:Set connEditService = Server.CreateObject("ADODB.Connection")connEditService.Open conStringThis started when i tried to change the sa password so that i couldaccess the db for a mail merge. I don't have the original sa passwordand i don't know if i enabled it by accident. If so how do i removeitor fix this error? thanks jho.
View 1 Replies View Related
hello ,
can anybody help me
iam getting the same error " target machine will activly refused to connect". while iam connecting to the sql server 2000. i didn't find the sql server listens on 1433 .how to know server is listenning on port 1433.