O'Reilly Forums: Having SQL Server Express problems in chapter 1? - O'Reilly Forums
Having SQL Server Express problems in chapter 1?
#1
Posted 25 February 2008 - 02:37 PM
1. Before you try anything else, try running Visual C# as Administrator. When you go to run Visual C# or Visual Studio, instead of clicking on it in the Start menu, right-click on it. Then select "Run As..." and run it as Administrator. (If "Run As..." doesn't show up, hold down shift when you right-click.) This fixes the problem for most people.
2. Make sure you've got SQL Server Express 2005 installed. It should be installed automatically as part of Visual C# 2008 Express (if you checked all of the boxes when you installed it). But if it's not, you can download the installer here: http://msdn2.microsoft.com/en-us/express/bb410791.aspx
3. Try uninstalling SQL 2005 Express. Then you can either reinstall it or try using the "Repair" option from the add/remove programs control panel.
4. Make sure you're running as Administrator -- you may be running into permission problems.
5. Try this fix.
If you're still running into trouble getting SQL up and running, please check these threads in the forum:
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=4567
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=4980
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5139
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5514
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5934
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5971
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=6722
If you're still having a lot of trouble, you can download a Microsoft Windows Server 2003 R2 Enterprise Edition VHD directly from Microsoft -- it's a free virtual hard drive with a 30-day evaluation version of Windows Server 2003 R2. This should give you a clean slate to install Visual C# 2008 Express Edition, which should install SQL Server Express automatically if you check all of the boxes in the installer. (You'll need to download Microsoft Virtual Server to run it.)
The first and last chapters are the only ones in the book that use SQL Server Express, so if worse comes to worst and you absolutely can't get SQL running, you can skip to chapter 2 and come back to chapter 1 later. But we really hope you can get SQL Server working, because the project in chapter 1 is really satisfying to buil.
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com
#2
Posted 07 September 2008 - 11:07 AM
So - I can't get past this hurdle... The 2008 install fails, without giving me an error message (but it does send stuff to Microsoft). I can include q local 2008 database without a problem - just not the service based database the book insists on (without explanation)
Not a good start!!. How about providing an example which uses Oracle XE instead (that installs 100% just fine for me ) <grin>
This was intended to be an easy intro to get my son started on programming using a modern language. Perhaps C# was the wrong choice - and I should have gone Java instead.(
I like the style of your book though)
Graham
#3
Posted 30 September 2008 - 07:25 PM
1. Prior to the first use of SQL Express when I create my first instance, I had to clear the /documents and setting/<user>/local settings/application data/SQL server data/SQLExpress. The directory SQLExpress has to be deleted.
2. Then setup the SQL express instance in the SQL management console to use my userid to startup and I don’t have any more hassles.
#4
Posted 07 December 2008 - 06:19 AM
1. Prior to the first use of SQL Express when I create my first instance, I had to clear the /documents and setting/<user>/local settings/application data/SQL server data/SQLExpress. The directory SQLExpress has to be deleted.
2. Then setup the SQL express instance in the SQL management console to use my userid to startup and I don’t have any more hassles.
Thanks, for solution. Now I use SQL 2008 and everything works fine.
#5
Posted 14 December 2008 - 11:55 AM
I am running Windows XP with Visual Studio 2008 Team System
#6
Posted 15 December 2008 - 01:45 PM
#7
Posted 03 April 2009 - 07:09 PM
1. Prior to the first use of SQL Express when I create my first instance, I had to clear the /documents and setting/<user>/local settings/application data/SQL server data/SQLExpress. The directory SQLExpress has to be deleted.
2. Then setup the SQL express instance in the SQL management console to use my userid to startup and I don�t have any more hassles.
For those Users runnning any 64-bit OS with SQLExpress 64-bit version, you will continue to get this error. The plug-in for the Service-based Database is for 32-bit OS's ONLY!
From the mouth of Microsoft:
FAQ: Error creating a Service-based database in Visual Studio 2008 SP1
A few of you have run into problems when trying to add a new Service-based database to your project in Visual Studio 2008 SP1. This problem has been reported to Microsoft Connect and the Visual Studio team is working on a fix, but I thought I would provide some details on a workaround in the meantime.
What's the problem?
This issue occurs when you have Visual Studio 2008 SP1 (any edition) and SQL Server 2008 Express x64 installed. This won't happen if you have the 32bit version of SQL Express installed. You know you've hit the issue when you see this error:
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
The problem is caused by an error when checking the registry to verify that SQL Express is actually installed; it's installed, but Visual Studio doesn't think it's installed.
Two ways to work around the problem
The easy way out is to uninstall the 64bit version of SQL Express and replace it with the 32bit version installed in the WoW. You can download this version from the Express website. If you're fiercely devoted to the native 64bit installation, or you just don't like taking the easy way out, there is another option...
Congratulations on boldly accepting the challenge to stick with the native 64bit version of SQL Express in the face of this error. In order to "trick" Visual Studio into working with a database on this architecture of SQL while still preserving the expected behavior of how the database works, we're going to have to plumb the depths of working with a User Instance in order to create the database manually, add the existing database to the project and then "hook it up" once it's there.
Create the Database
To perform this part of you're task you'll need to connect directly to the User Instance with the client tool of your choice. I've already posted instructions on how to do this, so check those out first to get a connection to the User Instance. Once connected, we need to create a database in the same folder as the project you want the database to live in. You can do this using the standard UI dialogs in Management Studio by right-clicking on the Databases folder and selecting New Database. Once you have the dialog open, give the database a name and set the file path to the folder where your project lives. You can also do this in T-SQL if you'd like, here is a sample of the statement that would do this:
CREATE DATABASE database1
ON PRIMARY
(NAME = database1,
FILENAME = N'C:\Users\<username>\Documents\Visual Studio 2008\Projects\WindowsFormsApplication1\WindowsFormsApplication1\database1.mdf',
SIZE = 10MB,
MAXSIZE = 50MB,
FILEGROWTH = 10%)
LOG ON
( NAME = database1_log,
FILENAME = N'C:\Users\<username>\Documents\Visual Studio 2008\Projects\WindowsFormsApplication1\WindowsFormsApplication1\database1_log.ldf',
SIZE = 10MB,
MAXSIZE = 50MB,
FILEGROWTH = 10%)
GO
As you can see, this is a normal CREATE DATABASE statement where I've specified the FILENAME argument to be the project folder for my project. Just replace the <username> place holder with your user name and your ready to go.
Important: Once the database has been created, you need to detach it from the User Instance before you go onto the next step or you're in for trouble later.
Adding the database to your VS project
Make sure you've detached the database after creating in the previous section. (I told you it was important.) Back in Visual Studio you can now add the database to the project.
On the Project menu, select Add Existing.
In the File Open dialog, navigate to the project directory select the database you created. (You may need to change the file type being shown so that you see the Data Files in the dialog.)
Select the database and click Add.
You'll get the same error that got us here in the first place. Ignore it! Hit OK as if all is right with the world and you'll see that the database was added to the project, take that foolish error message.
Hookin' the database up
At this point your database is in your project, but we want to take the final step to make it just like it would have been if you did this using the Add New Item | Service-based Database method. Add New Item, in this case, would have automatically dropped you into the DataSet wizard, so lets create one now.
On the Data menu, select Create New Data Source.
In the Data Source wizard, select Database and click Next.
Click the New Connection button.
In the Add Connection dialog, click the Browse button.
Select the database you created at the beginning and click Open. (If you didn't detach it like I told you to, this is where you're going to run into trouble. Go ahead and detach it now, I'll wait…)
If you don't trust me, click the Test Connection button.
Click OK.
Back in the Data Source Configuration Wizard, click Next.
Accept the option to save the connection string, feel free the change it to something that makes sense to you, and click Next.
After VS scans the database and discovers it's empty, click Finish.
You've now got a spankin' new DataSet in your project that's connected to your database. You can work with the database as you would expect, for example you could use the Server Explorer/Database pane to add new objects to the database which you could then add to your DataSet. Like I said, it's not the most straight forward workaround, but if you only need to create one database, this will take a lot less time than uninstalling the 64bit version and replacing it with the 32bit version. Hopefully VS will release a fix for this issue soon; go over to MS Connect and cast your vote to show that this issue has affected you. The more people affected, the better the chance for a fix.
- Mike
Here is the Microsoft potential Hotfix:
http://support.microsoft.com/hotfix/KBHotf...px?kbnum=957944
This post has been edited by RodimusHH: 03 April 2009 - 08:36 PM
#8
Posted 11 May 2009 - 03:09 PM
From the mouth of Microsoft:
FAQ: Error creating a Service-based database in Visual Studio 2008 SP1
A few of you have run into problems when trying to add a new Service-based database to your project in Visual Studio 2008 SP1. This problem has been reported to Microsoft Connect and the Visual Studio team is working on a fix, but I thought I would provide some details on a workaround in the meantime.
What's the problem?
This issue occurs when you have Visual Studio 2008 SP1 (any edition) and SQL Server 2008 Express x64 installed. This won't happen if you have the 32bit version of SQL Express installed. You know you've hit the issue when you see this error:
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
The problem is caused by an error when checking the registry to verify that SQL Express is actually installed; it's installed, but Visual Studio doesn't think it's installed.
Two ways to work around the problem
The easy way out is to uninstall the 64bit version of SQL Express and replace it with the 32bit version installed in the WoW. You can download this version from the Express website. If you're fiercely devoted to the native 64bit installation, or you just don't like taking the easy way out, there is another option...
Congratulations on boldly accepting the challenge to stick with the native 64bit version of SQL Express in the face of this error. In order to "trick" Visual Studio into working with a database on this architecture of SQL while still preserving the expected behavior of how the database works, we're going to have to plumb the depths of working with a User Instance in order to create the database manually, add the existing database to the project and then "hook it up" once it's there.
Create the Database
To perform this part of you're task you'll need to connect directly to the User Instance with the client tool of your choice. I've already posted instructions on how to do this, so check those out first to get a connection to the User Instance. Once connected, we need to create a database in the same folder as the project you want the database to live in. You can do this using the standard UI dialogs in Management Studio by right-clicking on the Databases folder and selecting New Database. Once you have the dialog open, give the database a name and set the file path to the folder where your project lives. You can also do this in T-SQL if you'd like, here is a sample of the statement that would do this:
CREATE DATABASE database1
ON PRIMARY
(NAME = database1,
FILENAME = N'C:\Users\<username>\Documents\Visual Studio 2008\Projects\WindowsFormsApplication1\WindowsFormsApplication1\database1.mdf',
SIZE = 10MB,
MAXSIZE = 50MB,
FILEGROWTH = 10%)
LOG ON
( NAME = database1_log,
FILENAME = N'C:\Users\<username>\Documents\Visual Studio 2008\Projects\WindowsFormsApplication1\WindowsFormsApplication1\database1_log.ldf',
SIZE = 10MB,
MAXSIZE = 50MB,
FILEGROWTH = 10%)
GO
As you can see, this is a normal CREATE DATABASE statement where I've specified the FILENAME argument to be the project folder for my project. Just replace the <username> place holder with your user name and your ready to go.
Important: Once the database has been created, you need to detach it from the User Instance before you go onto the next step or you're in for trouble later.
Adding the database to your VS project
Make sure you've detached the database after creating in the previous section. (I told you it was important.) Back in Visual Studio you can now add the database to the project.
On the Project menu, select Add Existing.
In the File Open dialog, navigate to the project directory select the database you created. (You may need to change the file type being shown so that you see the Data Files in the dialog.)
Select the database and click Add.
You'll get the same error that got us here in the first place. Ignore it! Hit OK as if all is right with the world and you'll see that the database was added to the project, take that foolish error message.
Hookin' the database up
At this point your database is in your project, but we want to take the final step to make it just like it would have been if you did this using the Add New Item | Service-based Database method. Add New Item, in this case, would have automatically dropped you into the DataSet wizard, so lets create one now.
On the Data menu, select Create New Data Source.
In the Data Source wizard, select Database and click Next.
Click the New Connection button.
In the Add Connection dialog, click the Browse button.
Select the database you created at the beginning and click Open. (If you didn't detach it like I told you to, this is where you're going to run into trouble. Go ahead and detach it now, I'll wait…)
If you don't trust me, click the Test Connection button.
Click OK.
Back in the Data Source Configuration Wizard, click Next.
Accept the option to save the connection string, feel free the change it to something that makes sense to you, and click Next.
After VS scans the database and discovers it's empty, click Finish.
You've now got a spankin' new DataSet in your project that's connected to your database. You can work with the database as you would expect, for example you could use the Server Explorer/Database pane to add new objects to the database which you could then add to your DataSet. Like I said, it's not the most straight forward workaround, but if you only need to create one database, this will take a lot less time than uninstalling the 64bit version and replacing it with the 32bit version. Hopefully VS will release a fix for this issue soon; go over to MS Connect and cast your vote to show that this issue has affected you. The more people affected, the better the chance for a fix.
- Mike
Here is the Microsoft potential Hotfix:
http://support.microsoft.com/hotfix/KBHotf...px?kbnum=957944
None of this seemed to work when I attempted to deploy the application outside of VS. Even the hotfix did nothing. So frustrating. any ideas anyone?
#9
Posted 04 July 2009 - 03:22 PM
Yeah, don't do drag and drop programming. It will not work on 64bit sql and visual studio. Attempting to fix autogenerated code is stupid when you can just write it yourself ... asap.
I just got this book and I really hope the following chapters are better, I wanted to learn C# and object oriented programming. I'm an older environmental engineer that knows sql and this is not a sql book, just the first example has sql in it and a poor example it is at that. The poor guy's laptop database would not be in sync with his desktop if he did not make the same changes to both....no connection string to a central db.
Now to ensure C# can talk to sql, all in 64 bit, I just set up a DataContext class and table definition and used linq to grab some Contact information onto the form....I just slapped it in a datagridview box to make sure they could talk to each other and they do just fine.
I'm not playing with this anymore, and moving on to the next chapters, which I hope are more directed to object orientated programing.
Here is my quick hack code to get sql over to the form using linq, my object is people, which I just made it a var for expediency. You could make it look pretty using text boxes and you can read or write to sql with that object.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.Linq;
using System.Data.Linq.Mapping;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
string connectionString = "Data Source=LANBOX\\SQLEXPRESS;Initial Catalog=Contacts;Integrated Security=True;Connect Timeout=30";
Contacts contacts = new Contacts(connectionString);
var people = from info in contacts.people
select new
{
contactID = info.ContactID,
company = info.Company,
telephone = info.Telephone,
email = info.Email,
client = info.Client,
lastCall = info.LastCall,
};
dataGridView1.DataSource = people;
dataGridView1.Show();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("Contact List 1.0 \n\nWritten By: Owen Burns", "About");
}
}
public class Contacts : DataContext
{
public Contacts(string connectionString) : base(connectionString) { }
public Table<People> people
{
get { return this.GetTable<People>(); }
}
}
[Table(Name = "People")]
public class People
{
[Column(IsPrimaryKey = true)]
public int ContactID { get; set; }
[Column()]
public string Name { get; set; }
[Column(CanBeNull = true)]
public string Company { get; set; }
[Column(CanBeNull = true)]
public string Telephone { get; set; }
[Column(CanBeNull = true)]
public string Email { get; set; }
[Column(CanBeNull = true)]
public bool Client { get; set; }
[Column(CanBeNull = true)]
public DateTime LastCall { get; set; }
}
}
#10
Posted 19 August 2009 - 04:39 PM
1. Before you try anything else, try running Visual C# as Administrator. When you go to run Visual C# or Visual Studio, instead of clicking on it in the Start menu, right-click on it. Then select "Run As..." and run it as Administrator. (If "Run As..." doesn't show up, hold down shift when you right-click.) This fixes the problem for most people.
2. Make sure you've got SQL Server Express 2005 installed. It should be installed automatically as part of Visual C# 2008 Express (if you checked all of the boxes when you installed it). But if it's not, you can download the installer here: http://msdn2.microsoft.com/en-us/express/bb410791.aspx
3. Try uninstalling SQL 2005 Express. Then you can either reinstall it or try using the "Repair" option from the add/remove programs control panel.
4. Make sure you're running as Administrator -- you may be running into permission problems.
5. Try this fix.
If you're still running into trouble getting SQL up and running, please check these threads in the forum:
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=4567
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=4980
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5139
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5514
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5934
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=5971
http://www.headfirstlabs.com/phpBB2/viewtopic.php?t=6722
If you're still having a lot of trouble, you can download a Microsoft Windows Server 2003 R2 Enterprise Edition VHD directly from Microsoft -- it's a free virtual hard drive with a 30-day evaluation version of Windows Server 2003 R2. This should give you a clean slate to install Visual C# 2008 Express Edition, which should install SQL Server Express automatically if you check all of the boxes in the installer. (You'll need to download Microsoft Virtual Server to run it.)
The first and last chapters are the only ones in the book that use SQL Server Express, so if worse comes to worst and you absolutely can't get SQL running, you can skip to chapter 2 and come back to chapter 1 later. But we really hope you can get SQL Server working, because the project in chapter 1 is really satisfying to buil.
#11
Posted 04 September 2009 - 11:48 AM
When trying to install Contacts I get an error dialog that states;
Prerequisite check for system component SQL Server 2008 Express Edition failed with the following error message:
"An error occurred attempting to install SQL Server 2008 Express Edition."
I did a clean(ish) install of 'SQLEXPRADV_x64_ENU.exe' and can see that an instance of SQLEXPRESS is running via 'SQL Server Configuration Manager' and I can connect to it via SQL Server Management Studio, so I'm pretty sure that SQL 2008 Express is installed...
But looking at the log file the error dialog indicates, there's a section at the end as below,
Running external check with command 'C:\Users\fish\AppData\Local\Temp\VSDE17A.tmp\SqlExpress2008\SqlExpressChk.exe' and parameters ''
Process exited with code -1
Setting value '-1 {int}' for property 'SQLExpressInstalled'
The following properties have been set for package 'SQL Server 2008 Express Edition':
Property: [SQLExpressInstalled] = -1 {int}
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueNotEqualTo' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
Result of running operator 'ValueLessThan' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Fail'
'SQL Server 2008 Express Edition' RunCheck result: Fail
A prerequisite failed for Package "SQL Server 2008 Express Edition"
Package failed with message "An error occurred attempting to install SQL Server 2008 Express Edition."
Any ideas or pointers folks?
#12
Posted 24 September 2009 - 09:29 AM
#13
Posted 18 November 2009 - 03:11 PM
After looking online to see what might be wrong I am still at a loss. May I request, as a newbie, a plain English explanation and what to do to fix? I get that everyone that has been around programming for years can read these examples and quick fixes but please, for those of us that are just learning this, dumb it down. Jargon and technical terms serve me no purpose.
Is this a SQL problem? I don't know. I can look at all the stuff on how to reinstall, log in as admin, whatever, but I don't even know if the issue I am having is because of this or some other issue.
I bought this book because I needed to get the info in terms that could be understood by a non-programmer. So far, my biggest hurdle has been trying to learn from people that cannot seem to back up to a level where they have to explain everything. This book seemed to do that but now I am just as frustrated as I am in class.
Also, it would be most helpful if the links to the specific pages in the forums don't all link to the main page. As there is not even a description or post title with each link I can't figure out where to go within the forum page. I've tried clicking directly, copying the link and pasting within the forum, copying just the last part of the link and pasting onto forum address and searching within forum with link. None of these get me anywhere.
Thanks in advance for the help.
#14
Posted 06 January 2010 - 03:48 AM
When trying to install Contacts I get an error dialog that states;
Prerequisite check for system component SQL Server 2008 Express Edition failed with the following error message:
"An error occurred attempting to install SQL Server 2008 Express Edition."
I did a clean(ish) install of 'SQLEXPRADV_x64_ENU.exe' and can see that an instance of SQLEXPRESS is running via 'SQL Server Configuration Manager' and I can connect to it via SQL Server Management Studio, so I'm pretty sure that SQL 2008 Express is installed...
But looking at the log file the error dialog indicates, there's a section at the end as below,
Running external check with command 'C:\Users\fish\AppData\Local\Temp\VSDE17A.tmp\SqlExpress2008\SqlExpressChk.exe' and parameters ''
Process exited with code -1
Setting value '-1 {int}' for property 'SQLExpressInstalled'
The following properties have been set for package 'SQL Server 2008 Express Edition':
Property: [SQLExpressInstalled] = -1 {int}
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueNotEqualTo' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
Result of running operator 'ValueLessThan' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Fail'
'SQL Server 2008 Express Edition' RunCheck result: Fail
A prerequisite failed for Package "SQL Server 2008 Express Edition"
Package failed with message "An error occurred attempting to install SQL Server 2008 Express Edition."
Any ideas or pointers folks?
I had this error message on my 64-bit Windows 7 PC. When I moved the setup.exe file along with the other files in the Publish directory to my 32-bit Win 7 Laptop, everything worked perfectly. So for me it's a 64-bit system problem. Other than that I can't offer any pointers. I'm completely new to programming and SQL and had a hard time following the post earlier on enabling 64-bit SQL.
#15
Posted 18 January 2010 - 05:59 PM
I also got the same message on my x64 Vista computer. My fix to it was that I double clicked on the file named Contacts (Application Manifest) right above the setup file in the publish directory. It installed the program and ran it for me...
#16
Posted 19 January 2010 - 01:17 PM
After looking online to see what might be wrong I am still at a loss. May I request, as a newbie, a plain English explanation and what to do to fix? I get that everyone that has been around programming for years can read these examples and quick fixes but please, for those of us that are just learning this, dumb it down. Jargon and technical terms serve me no purpose.
Is this a SQL problem? I don't know. I can look at all the stuff on how to reinstall, log in as admin, whatever, but I don't even know if the issue I am having is because of this or some other issue.
I bought this book because I needed to get the info in terms that could be understood by a non-programmer. So far, my biggest hurdle has been trying to learn from people that cannot seem to back up to a level where they have to explain everything. This book seemed to do that but now I am just as frustrated as I am in class.
Also, it would be most helpful if the links to the specific pages in the forums don't all link to the main page. As there is not even a description or post title with each link I can't figure out where to go within the forum page. I've tried clicking directly, copying the link and pasting within the forum, copying just the last part of the link and pasting onto forum address and searching within forum with link. None of these get me anywhere.
Thanks in advance for the help.
Exact same problem here. Running Vista 64-bit home edition and keep getting that error message when I run the setup.
Any solution for this? :/
#17
Posted 01 February 2010 - 11:06 AM
#18
Posted 04 April 2010 - 03:39 AM
When trying to install Contacts I get an error dialog that states;
Prerequisite check for system component SQL Server 2008 Express Edition failed with the following error message:
"An error occurred attempting to install SQL Server 2008 Express Edition."
I did a clean(ish) install of 'SQLEXPRADV_x64_ENU.exe' and can see that an instance of SQLEXPRESS is running via 'SQL Server Configuration Manager' and I can connect to it via SQL Server Management Studio, so I'm pretty sure that SQL 2008 Express is installed...
But looking at the log file the error dialog indicates, there's a section at the end as below,
Running external check with command 'C:\Users\fish\AppData\Local\Temp\VSDE17A.tmp\SqlExpress2008\SqlExpressChk.exe' and parameters ''
Process exited with code -1
Setting value '-1 {int}' for property 'SQLExpressInstalled'
The following properties have been set for package 'SQL Server 2008 Express Edition':
Property: [SQLExpressInstalled] = -1 {int}
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'Intel': true
Result of checks for command 'SqlExpress2008\SQLEXPR32_x86_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueNotEqualTo' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Bypass'
Running checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE'
Result of running operator 'ValueNotEqualTo' on property 'ProcessorArchitecture' and value 'amd64': false
Result of running operator 'ValueEqualTo' on property 'SQLExpressInstalled' and value '0': false
Result of running operator 'ValueLessThan' on property 'SQLExpressInstalled' and value '0': true
Result of checks for command 'SqlExpress2008\SQLEXPR_x64_ENU.EXE' is 'Fail'
'SQL Server 2008 Express Edition' RunCheck result: Fail
A prerequisite failed for Package "SQL Server 2008 Express Edition"
Package failed with message "An error occurred attempting to install SQL Server 2008 Express Edition."
Any ideas or pointers folks?
You've probably solved this by now (or given up); but I thought this reply might be useful for anyone googling the error:
In short, to solve your problem do this:
1. Right click 'Contacts' and select 'Properties'
2. Click 'Pubish' tab.
3. Click 'Prerequisites'
4. Uncheck 'SQL Server 2008 Express Edition'
5. Re-publish the application.
The installer should now work (for you).
Have a look here for more info:
http://social.msdn.microsoft.com/Forums/en...13-be6a55ca7589
#19
Posted 11 April 2010 - 11:04 AM
@ StevenKeith85
Nicely done! (i've added your post as an official "errata" to my book)
I am running windows 7 - x64, Visual C# express 8, and your solution clarified the prerequisite error I was getting with the "Contacts" setup.exe.
Two birds with one stone. It not only allowed me to test setup.exe, but shed light on accessible settings for the "publish" setup.exe package installer.
[For those similarly new to C#, open your "Contacts" project within the Visual C# Express IDE, right click on the "Contacts" project name in the "Solution Explorer - Contacts" window. When done following the recommended steps by StevenKeith85, remember to goto the "Build" menu at the top, and click on "Publish" to re-write the setup.exe files. Running setup.exe in the "publish" folder should now run the program]
To summarize:
"Contacts" - setup.exe was crashing with this error,
*****
Package failed with message "An error occurred attempting to install SQL Server 2008 Express Edition."
*****
From my understanding of the link to
http://social.msdn.microsoft.com/Forums/en...13-be6a55ca7589
The same instance of SQL Server cannot exist on the same PC.
(why a default dialog box of "already installed" is not shown, is a mystery)
Presumably, (I don't have an additional PC to test this, but others in the forum seemed to suggest this works) the book version of the "Contacts" - setup.exe should run fine on a different pc from the one it was created on.
The work-around version of "Contacts" - setup.exe won't install SQL Express, and therefore should only work on a different pc if that pc already has SQL Express installed on it.
This is my take on this particular error, and would welcome any corrections.
#20
Posted 31 May 2010 - 05:16 PM
Nicely done! (i've added your post as an official "errata" to my book)
I am running windows 7 - x64, Visual C# express 8, and your solution clarified the prerequisite error I was getting with the "Contacts" setup.exe.
Two birds with one stone. It not only allowed me to test setup.exe, but shed light on accessible settings for the "publish" setup.exe package installer.
[For those similarly new to C#, open your "Contacts" project within the Visual C# Express IDE, right click on the "Contacts" project name in the "Solution Explorer - Contacts" window. When done following the recommended steps by StevenKeith85, remember to goto the "Build" menu at the top, and click on "Publish" to re-write the setup.exe files. Running setup.exe in the "publish" folder should now run the program]
To summarize:
"Contacts" - setup.exe was crashing with this error,
*****
Package failed with message "An error occurred attempting to install SQL Server 2008 Express Edition."
*****
From my understanding of the link to
http://social.msdn.microsoft.com/Forums/en...13-be6a55ca7589
The same instance of SQL Server cannot exist on the same PC.
(why a default dialog box of "already installed" is not shown, is a mystery)
Presumably, (I don't have an additional PC to test this, but others in the forum seemed to suggest this works) the book version of the "Contacts" - setup.exe should run fine on a different pc from the one it was created on.
The work-around version of "Contacts" - setup.exe won't install SQL Express, and therefore should only work on a different pc if that pc already has SQL Express installed on it.
This is my take on this particular error, and would welcome any corrections.
Great post. This was exactly the solution I was looking for. And for those who are putting down the "Drag n Drop" aspect of what the book is teaching; its a start... don't put down others for not having the certainty that this is something we want to learn. This book is well written, apart from the issues I've run into, but this is Technology so its going to have some bumps. I'm just glad there is a forum of like minded (mostly) individuals.
Good luck with the rest of the book!.



















