Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
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
 
Old September 8th, 2011, 05:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 8th, 2011, 07:01 PM
Registered User
 
Join Date: Aug 2011
Posts: 13
Thanks: 0
Thanked 5 Times in 5 Posts
Default

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.
 
Old September 9th, 2011, 01:32 AM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

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..
 
Old September 9th, 2011, 03:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 9th, 2011, 03:55 PM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

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.
 
Old September 9th, 2011, 04:01 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 9th, 2011, 04:10 PM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

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.
 
Old September 9th, 2011, 04:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
morteza (September 9th, 2011)
 
Old September 9th, 2011, 04:25 PM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

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.
 
Old September 9th, 2011, 04:56 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Google Analytics code added to notification mail containing a full HTML page Imar Forum and Wrox.com Feedback 2 January 19th, 2010 03:34 PM
Error on the page 407. Grace BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 2 July 12th, 2009 02:52 PM
Chapter11 The SQL database file cannot be created in App_Data folder clark BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 January 15th, 2009 10:29 AM
problem openning huge xls file helmekki Excel VBA 3 October 5th, 2004 04:43 AM
Control not added to code page shmacgregor VS.NET 2002/2003 2 March 26th, 2004 05:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.