Open SQL 2005 Database Question

Oct 30, 2007

Shoud a SQL 2005 database remain open in a Visual Basic program, or should
it be opened and closed in every subroutine?

Thanks for any info.

View 3 Replies


ADVERTISEMENT

Cannot Open User Default Database. Login Failed. (only When IDE Is Open)

Sep 7, 2007

I get the below error only when my IDE open. It connects well when it is found closed.
[SqlException (0x80131904): Cannot open user default database. Login failed.Login failed for user 'JPASPNET'.]
I could solve this by giving the logged in windows user to impersonate under IIS window > WEBSITE > ASP.NET tab > EDIT CONFIG > APPLICATION tab
But I wish someone could give me the proper solution.
I almost tried all from giving ASPNET user as a administrator to configuring the same in Express management tool.
Environment: XP pro, VWD and SQL Express

View 3 Replies View Related

SQL Server 2005 And Express Permissions Nightmare/Cannot Open Database ASPNETDB.MDF Requested By The Login

Apr 12, 2007

I just spent the better par of 3 days creating a prototype in ASP.Net 2.0 and SQL Server Express only to discover that nobody from outside can see it...
ERROR with impersonation=true
User does not have permission to perform this action.
ERROR with impersonation=false
Unable to open the physical file "c:inetpubwwwroot------.mdf". Operating system error 5: "5(Access is denied.)".An attempt to attach an auto-named database for file c:inetpubwwwroot-----.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.  
What makes this so difficult?
What am I missing?
 

View 9 Replies View Related

Aspclassic On IIS7 SQL 2005. ODBC SQL Server Driver[SQL Server]Cannot Open Database Requested By The Login. The Login Failed

Apr 16, 2008


Hi all,

Have just tried my sql server 2005 connected asp classic website on II7 for the first time and have gotten some errors.
First off I have unchecked show friendly errors in IE and have enabled ASP to send error messages to the browser.

My error I get is when I execute a basic .asp page:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "mydatabasename" requested by the login. The login failed.
/index.asp, line 10 which is dbConnect.Open cstring


from this peice of code:

sub dbOpen()
set dbConnect = Server.CreateObject("ADODB.Connection")
cstring = "DSN=mysqldsn; Trusted Connection=yes"
dbConnect.Open cstring
end sub

I have gone into ODBC and have setup both a user dsn and file dsn that equals mysqldsn and points to my database (I know you only need to set up one DSN but I'm not sure which)

I also notice under mywebsite home panel there is a connection string option. Do I do anything with that?


Definatley a lot more to it than XP's II6!

Any help or advice would be greatly appreciated.

View 3 Replies View Related

Cannot Open SQL Server 2005 Express From C#.Net 2005 (using Code)

Mar 15, 2008


can anybody help me.

I am getting an sql Server 2005 connection error from c#.net 2005.

following is the 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)"}

---------------------------------------------------------------------------------------------


i have changed the default settings. local and remote connection are enabled.

following are the code i am using in C# .Net 2005
---------------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;


SqlConnection conn = new SqlConnection("server=localhost; user id= sa; pwd =; Initial Catalog=testdb;");

---------------------------------------------------------------------------------------------------------------


when i connect through the c# wizard, everything is perfect.

thanks in advance
sam alex

View 10 Replies View Related

The Microsoft Jet Database Engine Cannot Open MS-Access Database

Aug 18, 2007


I have MS-Access as data source for one of the reports. I can preview the report fine from BI studio however, it does not work when I deploy it on report server.

The error is :

An error has occurred during report processing.
Cannot create a connection to data source '<data source name>'.

The Microsoft Jet database engine cannot open the file '<UNC location of the MS-Access database>'. It is already opened exclusively by another user, or you need permission to view its data.




MS-Access database is located on a different server.

Any help to solve this? I understand it has something to do with permission both on server where reporting service is running as well as the server where MS-access database is located. Pls help.

View 2 Replies View Related

Cannot Open Database Database Requested By The Login

May 14, 2007

We have a back end procedure that inserts/updates records in a table. Usually the upload file will have around 20k records. This procedure is called from our application which is designed using hibernate,struts.

Upload is getting completed. But after the upload is over and control goes to application code, we are again hitting the above table to get some details. Is this the root cause for the below issue?

This is what we get in application logs,

SQL Error: 4060, SQLState: S1000
2007-04-30 16:17:27,840 - ERROR [TP-Processor2] JDBCExceptionReporter.logExceptions(58) | Cannot open database "sdgebis" requested by the login. The login failed.
2007-04-30 16:17:27,840 - WARN [TP-Processor2] JDBCExceptionReporter.logExceptions(57) | SQL Error: 18456, SQLState: 28000
2007-04-30 16:17:27,840 - ERROR [TP-Processor2] JDBCExceptionReporter.logExceptions(58) | Login failed for user 'sa'.

2007-04-30 16:17:27,856 - WARN [TP-Processor2] SQLErrorCodeSQLExceptionTranslator.translate(279) | Unable to translate SQLException with errorCode '4060', will now try the fallback translator

What could be the reason for the above error?

Can anyone help me out please?

View 1 Replies View Related

'Object Was Open' In SQL 2005

Jun 6, 2008

I am getting an error 'Object was open' when executing a stored procedure with larger am amounts of data. This procedure runs from a VB 6.00 application on SQL 2005. When running the script in SQL there is no problem

rs.Open cmd, Options:=adCmdStoredProc

IMPORTANT: This error ONLY happens with large amount of data. The threshold level is about 250000 rows of data. If more than that amount of data is retreived the error occurs. If less then there is no problem.

Any suggestion would be greatfull

Thanks

View 1 Replies View Related

How To Open An Package In SQL 2005

May 15, 2008

hi all,
How to open a Package from SQL 2005, i can able to view the job shedule and package related to that job but i am not able to open and see the code inside that job. Is there is any way to see the design or the coding inside that job

View 1 Replies View Related

~* Cannot Open 2005 Rdl In 2003 *~

Jul 24, 2007

Hi everbody,


when I add rdl filed on VS2003 from VS2005, it give me an error :
Deserialization failed: The Report element was not found.

Are there anybody to help me?

Thanks.

View 1 Replies View Related

Open .MDF Database

Apr 13, 2008

When I try to open a .MDF file with SQL Server Management Studio Express last version I get an error :
There is no editor available for "DATABASE.MDF"
Make sure the application for the file type (.MDF) is installed.
How can I open the MDF file.I tried to use also the database NORTHWIND.MDF provided with
MSSQL 2000  sample but the same error.
What can I do ?
I am using Microsoft SQL Server 2005 Express.
I want to open the .MDF file to create a index for Full Text Search.
Thank You !

View 5 Replies View Related

Cannot Open Database

Feb 29, 2004

Hi i am currently doing my final year project. I am using MS SQL and ASP. I uncounter the error below when i am doing my login.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 's01673925'. Login fails.

this is my connection string:
Set connection = Server.CreateObject("ADODB.Connection")
connection.Open "DSN=LocalServer1;UID=s01673925;PWD=password;DATABA SE=s01673925"

Can any1 help mi by telling mi why i cant connect 2 database?

View 8 Replies View Related

OLE DB Open Database

Feb 26, 2008

Hi.
I Have some problem then i Use SQL Server Compact 3.5. So i can't open database.






Code Snippet

HRESULT hr;
IDBInitialize * pIDBInitialize = NULL;
IDBProperties * pIDBProperties = NULL;
IDBCreateSession * pIDBCrtSession = NULL;
DBPROPSET rgPropSets[1];
DBPROP rgProps[1];
ULONG iPropSet = 0;
ULONG iProp = 0;
ICommandText * pICmdText = NULL;
IDBCreateCommand * pIDBCrtCmd = NULL;
ICommandPrepare * pICmdPrepare = NULL;
ICommandWithParameters * pICmdWParams = NULL;
IAccessor * pIAcc = NULL;
ULONG cParams;
DBPARAMINFO * rgParamInfo = NULL;
OLECHAR * pNamesBuffer = NULL;
ULONG cBindings;
DBBINDING rgBindings[3];
ULONG cbRowSize;
HACCESSOR hAcc;
BYTE * pData = NULL;
DBPARAMS params;
LONG cRowsAffected;
CoInitialize(NULL);
// Specify the MyDB database as wzDbName.
WCHAR wzDbName[] = L"C:\Northwind.sdf";

// Initialize the property set values.and create the data source object.
for (ULONG i = 0; i < sizeof(rgProps)/sizeof(rgProps[0]); i++)
{
VariantInit(&rgProps[i].vValue);
}

hr = CoCreateInstance(CLSID_SQLSERVERCE_3_5, NULL, CLSCTX_INPROC_SERVER,
IID_IDBInitialize, (LPVOID *) &pIDBInitialize);
if (FAILED(hr))
{
//Send an error-specific message and do error handling.
goto Exit;
}

iProp = 0;
rgProps[iProp].dwPropertyID = DBPROP_INIT_DATASOURCE;
rgProps[iProp].dwOptions = DBPROPOPTIONS_REQUIRED;
rgProps[iProp].vValue.vt = VT_BSTR;
rgProps[iProp].vValue.bstrVal = SysAllocString(wzDbName);
if(!(rgProps[iProp].vValue.bstrVal))
{
hr = E_OUTOFMEMORY;
goto Exit;
}
iProp++;

iPropSet = 0;
rgPropSets[iPropSet].rgProperties = rgProps;
rgPropSets[iPropSet].cProperties = iProp;
rgPropSets[iPropSet].guidPropertySet = DBPROPSET_DBINIT;
iPropSet++;

// Set the properties into the provider's data source object.
pIDBInitialize->QueryInterface(IID_IDBProperties,(void**)&pIDBProperties);

hr = pIDBProperties->SetProperties(sizeof(rgPropSets)/sizeof(rgPropSets[iPropSet]),
rgPropSets);
if(FAILED(hr))
{
goto Exit;
}

// Create a session that supports commands.
hr = pIDBProperties->QueryInterface(IID_IDBCreateSession, (void **)
&pIDBCrtSession);

...........
Example from MSDN. .
So after pIDBProperties->QueryInterface hr become E_NOINTERFACE . And i dont know why it happens. database - is a sample database which tou can find in Microsoft SQL Server Compact Editionv3.5Samples.
Please help !

View 4 Replies View Related

Cannot Open Database

Jun 8, 2006

My mdf file was deleted. I was able to restore the said file but unfortunately I can no longer open it.

I have also noticed that the recovered mdf file was smaller than the file before it was deleted.

What can I do to open the database file? I have tried the following lines using osql utility.

1> use db1sql1
2> go
Msg 946, Level 14, State 1, Server JDI11-31, Line 1
Cannot open database 'db1sql1' version 525. Upgrade the database to the latest version.

View 13 Replies View Related

How To Open A .bup File In SQL Server/2005

Aug 14, 2006

I have been given a .bup file which I am told contains a database I need to access. How do I open this .bup file. Please help !

View 1 Replies View Related

Cannot Open Database C:InetpubwwwrootReportsApp_Dataaspnetdb.mdf

Dec 8, 2006

I wrote a web application and tested it on the development pc and everything is working well. Then I created a Virtual Directory on my Test pc and transfered the developed site using the copy project in Visual Studio 2005. In my test pc I have .Net Framework 2.0 with SQL Express installed.
When I tried to run the site I get the following error message.
Cannot open database "C:InetpubwwwrootReportsApp_Dataaspnetdb.mdf" requested by the login. The login failed.Login failed for user 'W2678ASPNET'
I checked permissions and everything is ok. I strongly believe this error happens because I do not have access writes to the database. But when I open the SQL Server Management Studio, I cannot see my database there. I am totally new with this SQL server express edition that comes with Visual Studio 2005. I do not know how to add the ASPNET account to the database , because my application attaches the file at run time.
Could some one tell me how to do this? Any help is greaty appriciated.

View 7 Replies View Related

How Can I Open A .mdf AspnetDB DataBase ?

Jul 24, 2007

Hello everybody, I am working with SqlExpress and MSSQL Server Management Studio Express and do not manage to open the aspnetDB .mdf database in which I am storing all data about my users.I woulds like to open it and to be able to request it in order to check some strange things.Actually, I'm experiencing an isssue with that database since the request just below gives me two results for only one user: SELECT Member.Password, Member.PasswordAnswer
FROM aspnet_MemberShip Member, aspnet_Users Users
WHERE Member.UserId=Users.UserId AND Users.UserName='Admin'  Using this request returns me a user whom password is clear and an identical user whom password is hashed whereas I set PasswordFormat="Clear" in my Web.ConfigCould you explain me how I may proceed please? Thanx for your help   

View 3 Replies View Related

All Of The Sudden Cannot Open Database

Feb 26, 2008

I've never had any issues logging in, and now today I'm getting this error: Exception Details: System.Data.SqlClient.SqlException: Cannot open database "HRIService" requested by the login. The login failed. Any have some knowledge to drop on me concerning this? Here is the entire error:Server Error in '/HRIService' Application.

Cannot open database "HRIService" requested by the login. The login failed.Login failed for user 'IT-P02ASPNET'.



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 "HRIService" requested by the login. The login failed.Login failed for user 'IT-P02ASPNET'.

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 (0x80131904): Cannot open database "HRIService" requested by the login. The login failed.Login failed for user 'IT-P02ASPNET'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800131 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +172 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +381 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +173 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +357 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +30 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +494 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160 System.Web.UI.WebControls.Login.AttemptLogin() +105 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746









Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

View 8 Replies View Related

Cannot Open Database While Building

Mar 21, 2006

Hi Everyone,I'm facing this problem now.Cannot open database "C:myDB" requested by the login. The login failed.Login failed for user 'myLaptopASPNET'.May i ask how can i resolve?Please feel free to let me know the information you need.Thank You!

View 3 Replies View Related

Cannot Open Database Requested

Apr 5, 2007

Hello
this is very important for me.
I have to fix it immediately

I hope you can help me.

I get the following message

Quote: Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login 'Customs'. Login fails.

My connection string is below


Quote: db="Driver=SQL Server;Server=localhost;Database=Customs;UID=CrpysSQL;PWD=PASS;"

the UID CrpysSQL is db_owner of the table Customs.

what is wrong?

windows 2003 standard
SQL 2000
Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: )

View 2 Replies View Related

Cannot Open Database Diagram

Feb 13, 2006

I attached a SQL express database created on another computer on another SQL express instance running on another computer. When I tried to open a database diagram previously created i receive the following error:

"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects."

I must mention that in the attached database the server login is mapped to the databse as db_owner role. So what's the problem ?

Any suggestions ?

Thanks

View 1 Replies View Related

Cannot Open Database After Publishing

Feb 11, 2007

Hi All,

I have developed a database application using c# and SQL Express 2005.

I have coded a connection string that works fine on the development machine but upon publishing to another machine I am getting the following error message:

Cannot open database "name of database" requested by the login. The login failed. Login Failed for user "machine nameuser name".

The remote machine has SQL server express installed.

Now on the development machine the machine name and user names are different to that on the remote machine. I am using Windows Auth. The application successfully runs on the remote machine. It even updates the same database (as mentioned in the issue above) on a different form which all connection strings etc were created automatically by c#. I'm pretty new to all this and don't know where to go from here.
Any help would be greatly appritiated.

Thanks
Jon.

View 3 Replies View Related

Cannot Open Database Northwind Why

Sep 15, 2006

i am getting an error ... given below and my web.config is also given below

can any one help me is my connection string right ...
i am using sql server 2005 ..
my system name is soft18 ..


Server Error in '/prjLogin' Application.

Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.



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 "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.



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 (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'SOFT18Administrator'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115
System.Data.SqlClient.TdsParser.ThrowExcepti....................
........................
................
...................


//web.config

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>

<add name="QuickStartSqlServer" connectionString="Server=localhostSQLExpress;Integrated Security=SSPI;Database=Northwind;" providerName="System.Data.SqlClient" />
</connectionStrings>

<system.web>
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="Login.aspx"
protection="All"
timeout="30"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="Login.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false"/>
</authentication>

<membership defaultProvider="QuickStartMembershipSqlProvider"
userIsOnlineTimeWindow="15">
<providers>
<add
name="QuickStartMembershipSqlProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="LoginControls"
requiresUniqueEmail="true"
passwordFormat="Hashed"/>
</providers>
</membership>

<roleManager
enabled="true"
cacheRolesInCookie="true"
defaultProvider="QuickStartRoleManagerSqlProvider"
cookieName=".ASPXROLES"
cookiePath="/"
cookieTimeout="30"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
createPersistentCookie="false"
cookieProtection="All">
<providers>
<add name="QuickStartRoleManagerSqlProvider"
type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="QuickStartSqlServer"
applicationName="LoginControls"/>
</providers>
</roleManager>
<authorization>
<allow users="*"/>
</authorization>
<compilation debug="true"/>
</system.web>

</configuration>

View 1 Replies View Related

Cannot Open Database After Publishing

Feb 11, 2007

Hi All,

I have developed a database application using c# and SQL Express 2005.

I have coded a connection string that works fine on the development machine but upon publishing to another machine I am getting the following error message:

Cannot open database "name of database" requested by the login. The login failed. Login Failed for user "machine nameuser name".

The remote machine has SQL server express installed.

Now on the development machine the machine name and user names are different to that on the remote machine. I am using Windows Auth. The application successfully runs on the remote machine. It even updates the same database (as mentioned in the issue above) on a different form which all connection strings etc were created automatically by c#. I'm pretty new to all this and don't know where to go from here.
Any help would be greatly appritiated.

Thanks
Jon.

View 6 Replies View Related

Open Vc++ Database In Mssqlserver Database?

Apr 2, 2008

hi experts,
acutually i had configured the online application in my local pc..when i try to configure the database , it seems to be a vc++ intellisense database file(.ncb extension)..Actually i am working on ms sqlserver..i don't know how to open the vc++ database in mssqlserver...pls help me..
regards
senthil.d

View 1 Replies View Related

SQLEXPRESS Database Issue - Cannot Open Database ASPNETDB.MDF Requested By The Login, Login Failed

Aug 29, 2006

Hello Guys

This is my connection string

<add name ="ASPNETDBConnectionString1" connectionString ="Data Source= .SQLEXPRESS; Integrated Security = True; DataBase = ASPNETDB.MDF; User ID = MyWindowsUserName; Password = MyWindowsPassword; User Instance = False; Connect Timeout = 30" providerName ="System.Data.SqlClient"/>

I tried to research on the internet and i got a solution on changing the permissions for this database to enable user SystemName/ASPNET, but iam not able to access this ASPNETDB.MDF from SqlServer and if i go to server explorer in vs2005, i dint know where to chage the permissions.

Can anyone help me on this.

Thanks a lot

View 15 Replies View Related

The User Cannot Open Default Database

Oct 29, 2007

Hi Team
 I am working on a .net project, sql server 2000 based one. Now when iam connection to database server (remote) then me getting an error that the user cannot open the default database. I have made the database > all tasks > take offline. But after that I cant open the sql server thru the enterprise manager and query analyzer. How can I do the database online?
 Thanks
 Rajesh

View 1 Replies View Related

Failed To Open A Connection To The Database

Nov 21, 2007

Hello,



          I receive
this error when choosing the data connection in TableAdapter Wizard for me to
reference the ASPNETDB.mdf database.



Failed to open a connection to the database









"The header for file
'C:InetpubwwwrootWebsites4App_DataASPNETDB.MDF is not valid databasefile header. The FILE SIZE property is incorrect.An attempt to attach an auto-named database exists, or
specified file cannotbe opened, or it is located on UNC share."

Check the connection and try again.







 I already have the connection at config but the error
persists. 













... 
<connectionStrings>    <add
name="ConnectionString1" connectionString="Data
Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|mydatabase.mdf;Integrated
Security=True"providerName="System.Data.SqlClient" />    <add
name="ASPNETDBConnectionString1" connectionString="DataSource=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated
Security=True" providerName="System.Data.SqlClient" /> 
</connectionStrings>  <system.web>...  cheers,imperialx 

View 2 Replies View Related

Cannot Open User Default Database

May 10, 2008

When i try to open the Adventureworks database with SQL Server 2005 Express, it throws the following error:

Cannot open user default database. Login failed.Login failed for user 'SK-RIY37EQBYCYZsk'.
Dim connString As String = ConfigurationManager.ConnectionStrings("AdWorkConnectionString").ConnectionString
 <add name="AdworkConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAdventureWorks_Data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
 

View 5 Replies View Related

Open SQLConnection When Database Stopped

Dec 8, 2003

I'm hoping someone can explain to me exactly what the SQLConnection.Open() method does, especially when the database is stopped. I'm trying to include some error processing in my program, specifically to ensure the database is up and running. But even with the database stopped, the Open() statement works fine. Later, when I try to read from the database, I get the error. I'd like to stop it before it gets any further. Why is the Open() statement "working" even with the database stopped?

View 6 Replies View Related

Cannot Open Database Requested In Login

Jan 7, 2004

Hi there i'm having a bit of trouble with my asp.net authorisations and was wondering
if anyone would have any idea how I can solve it - as it's driving me nuts!.

On my local machine (I've MDSN) running with Web Matrix - my connection works fine.

However since i've uploaded it to my Hoster - Forms and DB - I get the error

Cannot open database requested in login 'TestDB'. Login fails. Login failed for user AUTHORITYNET SERVICE'.

Can anyone give me any pointers on where I should be going?

I've been told by my Hosting co. that the server should be set to localhost (as shown)
but thats about it!

My Web.config file looks like:-


<configuration>
<!-- application specific settings -->
<appSettings>
<add key="ConnectionString" value="server=localhost;Trusted_Connection=true;database=TestDB" />
</appSettings>

<!-- forms based authentication -->

<system.web>
<!-- enable custom errors for the application -->
<customErrors mode="Off"/>
<!--RemoteOnly" defaultRedirect="ErrorPage.aspx" -->
<!-- disable session state for application -->
<sessionState mode="Off" />
</system.web>
</configuration>



Thanks in advance for any help.

Dave.

View 3 Replies View Related

Cannot Open Database Requested In Login ?!(help Me ! )

Aug 5, 2004

Hi
I’m new in using “SqlClient� I have SQLSERVER 2000 on my computer and I made a Database named “TestDB�, and a code like this both Using VS.net :

// begin test Code ///////////////////////////////////
string connectionString =
"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog= TestDB;Data Source=HOSSEIN-COM;Workstation ID=HOSSEIN-COM";
string commandString =
"Select * from Categories";
SqlDataAdapter DataAdapter =
new SqlDataAdapter(
commandString, connectionString);
DataSet DataSet = new DataSet( );
DataAdapter.Fill(DataSet,"CategoryID");
Label1.Text= DataSet.Tables[0].Rows[0]["CategoryID"].ToString();

// end test code /////////////////////////////////////


And at browser I found this error when I Start Building the project:

“Cannot open database requested in login 'testdb'. Login fails. Login failed for user ‘(my coputer name / my name )’ “

Then I changed Catalog= TestDB to Catalog= Northwind and the table name to and available table name and it works , then I tried to create a table at northwind database but this error appeared :
“SELECT permission denied on object 'testTB', database 'Northwind', owner 'dbo'�
TestTB = my northwind table
I guess there must be some security setting in creating databases and tables that I do not know , And when I tried to install quick start the database was not installed ,
I have XP and VS.net and SQLserver 2000 . please halp me as You always do ;) …

View 2 Replies View Related

Cannot Open Database...requested By The Login...???

Mar 9, 2006

Hello,
I am using Visual Web Developer 2005 Express Edition and I am following the book:"Beginning ASP.NET 2.0 E-commerce in C# . I am encountering a problem and I haven't got the slightest idea how to solve the problem.
(If you have the book I got to p98)
If I debug then I get the next error: cannot open database"..." requested by the login...
In the book I had to make a GenericDataAccess.cs. What follows are snippets where the error occurs.
public static DataTable ExecuteSelectCommand(DbCommand command)
{
   DataTable table
   try
   {
      command.Connection.Open();
      DbDataReader reader = command.ExecuteReader();
      table = new DataTable();
      table.Load(reader);
      reader.Close();
   }
   catch (Exception ex)
   {
      Utilities.LogError(ex);
      throw ex;  //this is where my error occurs when I debug it
   }
   finally
   {
   commandConnection.close();
   }
   return table;
}
Ideas and sollutions are more than welcome :-)

View 1 Replies View Related







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