// 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;
}
// 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 !
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
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.
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
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 !
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?
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.
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.
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
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.
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!
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: )
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 ?
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.
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.................... ........................ ................ ...................
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.
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
<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.
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
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.
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" />
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?
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!
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 ;) …
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 :-)
I have copied a SQL Server 70 database to SQL Server 2000. Got error message during copying - 'unable to attach db' and when click on the db on SQL Server 2000, go erro - error 946 cannot open database version 525. Upgrade the database to the latest version. Anyone has any idea??:confused:
I have a software package that uses SQL server for the database. When loading a large amount of data I receive this error message. Can you please give me some idea what may be causing this error.
********* Memory Status ********* Free physical memory(KB) = 519528 Total of physical memory(KB) = 2147000 User Total of virtual address space(KB) = 2147352 Free virtual user(KB) = 2110500 Percent of Free physical = 0.241979 Percent of Free Virtual space = 0.982838 FIRecordset::GetNewConnection : DBException (Could not open FCB for invalid file ID 3 in database 'finance'.
I am using ASP to connect to an MS SQL database. The script connects to the database OK and I can retrieve recordset data and add new rows without a problem.
However, when I try to edit a recordset (using the recordset.update command), I get the following error:
Cannot open database requested in login 'andthen_development'. Login fails.
My first thought was that it must be a permissions problem, but that doesn't explain why I can view and add rows, but not edit. Any ideas?
I am currently getting the error Cannot open user default database. Login failed. Login failed for user '<user name>'. (Microsoft SQL Server, Error: 4064)
I took a backup of my Production Database but when I try to restore it I get this error. I cant do anything at the moment without getting this error.
I'm writting an standar application in c# that comunnicates with a sql server 2005 in a mobile device. The mobile device is connected to the pc with an usb wire. In the sample I've made, I've inserted in the form main a datagridview. I go on the wizard to select the data source. I choose a Microsoft SQL Server Mobile Edition data connection. The data source is tge activesync mobile device. I create a new database in the mobile device called test.sdf. The wizard has a button to check the conecttion and it rules. A new connection appears in the server explorer. I add rows through a query. I build the solution and no problem, but when I start the debug session an sqlceexception occurs: Data Source not found. In the database connection that the project has created the connection string is: Data Source ="Mobile Device est.sdf";
I didn't write any code. I just went on the wizards. All the code has been inserted by visual studio 2005.
I'm developing a windows forms app with a local database to be deployed on a couple of users machines. To aid deployment I'm using 'user instance' with a connection string of:
Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|gma.mdf;Integrated Security=True;User Instance=True;Connection Timeout=15;
I've started with a backup function based on the blog 'Backup and Restore with User Instance' linked to from this forum. Problem is I always get the error message 'Cannot open user default database. Login failed for user xxx'. This happens when I run in debugger or just run the exe directly.
I am very new to VB.Net but my goal is to build a web app that ineracts with an Access database. This is a very small scale app so I am not interested in using SQL server. I created my Access database and the udl file for connection information.
I created a class that opens a connection to the database when the webpage loads.
I get the following error though,
System.Data.OleDb.OleDbException was unhandled by user code ErrorCode=-2147467259 Message="The Microsoft Jet database engine cannot open the file 'C:InetpubwwwrootTest1RaceData.mdb'. It is already opened exclusively by another user, or you need permission to view its data." Source="Microsoft JET Database Engine" StackTrace: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 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.OleDb.OleDbConnection.Open() at clsDBConn.Open_Connection() in c:inetpubwwwrootTest1App_CodeclsDBConn.vb:line 12 at Default2.Page_Load(Object sender, EventArgs e) in c:inetpubwwwrootTest1Default2.aspx.vb:line 8 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The database is not open so I know it is a matter of security. I have configured IIS to use an admin account and the Access db does not have security turned on. In the UDL file I have selected read/write access and the test connection works.
Can anyone help me narrow down the root of this error,