Showing posts with label thru. Show all posts
Showing posts with label thru. Show all posts

Thursday, March 22, 2012

Cannot open user default database. Login failed.

Hi,

I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.

At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)

1) C:\Program Files\Company ABC\ABCDatabaseProject\

2) C:\Program Files\Company ABC Limited\ABCSystem\Database\

In my development machine, I can run my application where database path is testing path (number 2).

When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")

I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.

What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".

Thanks alot for your kind attention.

Try this first, and then check your string accordingly:

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

Buck Woody

|||I'm having this identical issue with an ODBC connection.
After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.

Cannot open user default database. Login failed.

Hi,

I got this application system having SQLExpress as database (ABCSystem.mdf). I'm connecting to the database thru connection string specifying database path in App.config.

At the same time, I got two paths for the mdf files. The first one is the path for my database project while the second one is the path to conduct testing. (This means that I got identical ABCSystem.mdf in two paths)

1) C:\Program Files\Company ABC\ABCDatabaseProject\

2) C:\Program Files\Company ABC Limited\ABCSystem\Database\

In my development machine, I can run my application where database path is testing path (number 2).

When I tried to copy the ABCSystem.mdf and ABCSystem_log.LDF and my application program files to another PC to test, I got the subject error message. (note that I copy program files under directory "C:\Program Files\Company ABC Limited\ABCSystem\" and mdf files under "C:\Program Files\Company ABC Limited\ABCSystem\Database\")

I try to edit path from database testing path to database project path in app.config, run the application, and notice that it is running OK.

What seems to cause the problem? Coz I need the database in the testing path which is "C:\Program Files\Company ABC Limited\ABCSystem\Database\" AND NOT "C:\Program Files\Company ABC\ABCDatabaseProject\".

Thanks alot for your kind attention.

Try this first, and then check your string accordingly:

http://msdn2.microsoft.com/en-us/library/ms345332.aspx

Buck Woody

|||I'm having this identical issue with an ODBC connection.
After wasting hours, I realized I only get the error when I try to change database name. (e.g. from a development to a production server). Based upon everything I've tried, I determined you CANNOT change server name in a Crystal report programmatically as in the Crystal sample code. It may be a possible to change servers if using a command based report (explicit SQL query), but our reports all use tables so a trial would be irrelevant.

Wednesday, March 7, 2012

Cannot install 'SQL Server 2005 Express Edition with Advanced Services'

I tried to install 'SQL Server 2005 Express Edition with Advanced Services'. First, I uninstalled the old version thru Add/Delete Programs in the Control Panel.

My first problem was I didn't have IIS installed on my computer, but, I could not find it in the downloads section.

Then the installation aborted because old version databases were in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data. But, it would not let me delete them, saying that they were being used, even though nothing was running at the time that I tried to delete them.


Hi,

"But, it would not let me delete them, saying that they were being used, even though nothing was running at the time that I tried to delete them."

I guess you still have a SQL Server installed on the system. If you want to install this, there has to be another option in the Add/Remove software panel for this instance. look in the service, if another service is running with SQL Server in its name (depending on the version you are using) you still have one installed.

"My first problem was I didn't have IIS installed on my computer, but, I could not find it in the downloads section."

IIS is part of the Windows installation, it can be installed by choosing the Add/remove Software icon in the control panel, choosing then the "Add/remove Windows Components" and then then "Internet Information Services (IIS).

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

I went into:
Control Panel
Add / Remove Programs
Add / Remove Windows Components

IIS was not one of the options there!


|||Whcih OS version are you using ?

HTH, jens Suessmeyer.

http://www.sqlserver2005.de
|||

Windows XP Home Edition.

|||

IIS is not included within Home Edition, any hack which enables you to use
it, wouldn′t comply with the license agreement within
the EULA.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

I upgraded to Windows XP Professional. I installed IIS.

When I attempt to run my app, I get an error message. I have had this problem occasionally before, the problem is that the SQL Server is not running. I went into Start/Run/c:\sseutil.exe -l. It said "The service MSSQL$SQLExpress" is not started. Would you like to start the service?" I replied "y". It said "Starting service....", but, it just hung there, it never actually succeeded in starting the service.

Before upgrading to XP Pro, my app ran, but, I would frequently have to go into sseutil.exe to start up SQL Server. After upgrading to XP Pro, I cannot get SQL Server to start.

I went into Control Panel/Add remove Programs and tried to uninstall Microsoft SQL Native Client. It said "This installation package cannot be installed by the Windows Installer service. You must install a Windows Service Pack that contains a newer version of the Windows Installer Service."

|||Hi,

if an error occured during the startup process of the SQL Server Service, it is logged in the event log, try to see what happened here and post back the event log entries if you are not familiar with debugging these.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||I un-installed and re-installed SQL Server 2005 Express Edition with Advanced Services. The install appeared to work correctly. My app no longer will run! sseutil.exe says "'MSSQL$SQLExpress' is not started. Would you like to start the service?", when I reply "y", it just hangs and never starts the service!|||Hi,

like I already said, look in the event log which will give you a more detailed information than the service starting message box. There has to be a problem during the start. The problem can vary so for trouleshooting the exact error message will be needed.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de