 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

September 8th, 2011, 05:33 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Then maybe you instance has a different name? Which folders do you see under C:\Program Files\Microsoft SQL Server
But if you want to make this work, please provide a bit more information (such as how you connect to your database using SQL Sevrver Management Studio and whether or not you used .\SqlExpress to connect to it.)
And once more: did you follow the instructions at the start of the book?
FInally, check the SQL Server Configuration Manager (or something like that) from the Start Menu. It lists the installations of SQL Server which may shed some light.
Quote:
Why You and another users have level and activity percentage bar but i have not?
It is really problem for me.
|
I don't know. Why would this be a problem?
Imar
|
|

September 8th, 2011, 07:01 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 13
Thanks: 0
Thanked 5 Times in 5 Posts
|
|
In addition to the questions Imar asked, could you also please do the following things?
Open a command shell and type the command sc query mssql$sqlexpress and then tell us what the response is.
In Administrative Tools, open Services and double click on the SQL Server (SQLEXPRESS) line. Tell us what it says under the heading Path to executable. It is probably cut off so you cannot see the whole thing, but please post as much as you can see.
|
|

September 9th, 2011, 01:32 AM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Quote:
|
Open a command shell and type the command sc query mssql$sqlexpress and then tell us what the response is.
|
It tells type:mssql$sqlexpress 10 win32_own_process ; state 4 running and so on... .
Quote:
|
tell us what it says under the heading Path to executable.
|
C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Binn\sqlservr.e xe" -sSQLEXPRESS
Quote:
|
Originally Posted by Imar
whether or not you used .\SqlExpress to connect to it.
|
I use .\sqlexpress(in both sql server authentication and windows authentication)
Quote:
|
And once more: did you follow the instructions at the start of the book?
|
Sorry Imar , No i did not.
And Once more : Is there any backup ? I restore it .
Thank's Imar.
__________________
Please excuse me for poor and bad English.
Last edited by morteza; September 9th, 2011 at 01:37 AM..
|
|

September 9th, 2011, 03:12 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
And Once more : Is there any backup ? I restore it .
|
There's no backup file, but you can attach the MDF to SQL Server. Appendix B, page 761 and further exaplain how this works. Once the database is attached to SQL Server you need to modify the connection strings as you no longer point to a file in AppData but to the SQL Server "Initial Catalog".
But I think something weird is going on. It looks indeed like you have an Express instance called .\SqlExpress but it's really weird that when you execute @@version it reports back that it's the "Enterprise Edition". Are you really sure you got that information from logging into .\SqlExpress and not from . or (local) or MachineName? And are you doing this all on a single machine?
For Visual Studio in general it's preferable to have a working instance of SqlExpress installed as many tools and samples (including mine) assume it's there. It's a convenient version of SQL Server for local development. If you have the time (and don't mind the trouble) I would see if you can make this work by uninstalling whatever you have now, then install SQL Express using the Web Platform Installer and then reinstall your current version of SQL Server.
One final thing to check: what happens when you add a new SQL Database using the Add New Item dialog? Does that work and can you access the tables?
Cheers,
Imar
|
|

September 9th, 2011, 03:55 PM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Quote:
|
what happens when you add a new SQL Database using the Add New Item dialog? Does that work and can you access the tables?
|
I tested it . I added new sql server database using Add New Item ,However, Visual studio gave me message that you need install sql server 2005 or 2008 again. It prevent even i add new database .
Should i intoduce sql server in web.config or machine.config?
Thank's
__________________
Please excuse me for poor and bad English.
|
|

September 9th, 2011, 04:01 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
Should i intoduce sql server in web.config or machine.config?
|
No, I don't think so. It looks like you have a messed up SQL Server installation. Have you tried reinstalling as I suggested earlier?
Imar
|
|

September 9th, 2011, 04:10 PM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Quote:
|
Have you tried reinstalling as I suggested earlier.
|
Really no(sorry).
I have tested this database( version 2005) in my home PC and it work's fine in visual studio 2008 and sql server 2005 . But in my laptop i have vs 2010 and sql server 2008. I have another database in my laptop in .\sqlexpress instance . I can check it, i can open table , i can open stored procedure and so on.
Is there any way i add this database to .\sqlexpress instance ?
__________________
Please excuse me for poor and bad English.
|
|

September 9th, 2011, 04:19 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, like I said, you can attach the MDF as described in Appendix B.
However, I doubt it's going to do you any good....
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

September 9th, 2011, 04:25 PM
|
|
Friend of Wrox
|
|
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
|
|
Hi Imar I attached database using appendix B .
It's worked . I can select column, delete records and so on.
Thanks for your help's.
__________________
Please excuse me for poor and bad English.
|
|

September 9th, 2011, 04:56 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, that works indeed, but you'll run into other problems later (not just in my book) when the presence of .\SqlExpress is assumed.
Cheers,
Imar
|
|
 |
|