Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 April 22nd, 2010, 07:39 PM
Authorized User
 
Join Date: Apr 2009
Posts: 48
Thanks: 16
Thanked 0 Times in 0 Posts
Default Unable to attach database with sql server management

Hi there,

I tried following the instructions on p692 to attach my dataBase to sql server but without succes.
Step 5 is where it goes wrong, the error I get is :
"Cannot show requested dialog.
Parameter name: nColIndex
Actual value was -1. (Microsoft.SqlServer.GridControl)"

I have been looking at forums to solve this, and i tried to:
- run as administrator, as also Imar suggests
- turn of the UAC
- type in a query to attch the db files.
- restart sql express
- uncheck collation
I also checked the Modify permissions, but it already seems to go wrong way before getting to any folder or file.

For most users either one of these "solutions" seemed to do the trick, but not for me.

I run sql server 2008 express on vista home premium. and I checked that sql server is actually running.

Does anybody have a solution to this?

Thanks in advance, Robin
 
Old April 23rd, 2010, 11:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Are you sure you are an Administrator that in turn has SQL access? Did you see this:

https://connect.microsoft.com/SQLSer...?wa=wsignin1.0

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 April 23rd, 2010, 12:40 PM
Authorized User
 
Join Date: Apr 2009
Posts: 48
Thanks: 16
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Thanks for your response. I did see that post and tried it, also that without succes.
This is what I did:

Code:
exec sp_attach_db @dbname =  'DBName',@filename1='C:\Data\SqlServer\ASPNETDB.mdf',@filename2='C:\Data\SqlServer\ASPNETDB.mdf_log.ldf'

this then gave the next error:
Msg 262, Level 14, State 1, Line 1
CREATE DATABASE permission denied in database 'master'.

All my attempts to get access as an administrator to the 'master' folder were denied, even though I ran the program as administrator. In sql management studio, in the security folder, I tried to make a new login account; administrator, that works, but I can't map the administrator to the master folder, permission is denied. The only account that does have the permissions is the sa account, and I can't remember that I ever registered as sa. I found some posts on how to reset the password, but for that you first have to get in via another account, which in my case does not exist.

So I uninstalled sql server 2008 right now I'm downloading sql server 2008 again, and it insisted on me making a password for the sa account.
I can't remember having done that the first time i installed the program.
So hopefully I'll be able to sign in with the sa account that has all the permissions. (and thus also change permissions for the administrator account.)
so let's see

I'll let you know.
best regards and congratulations with your new book, Robin
 
Old April 23rd, 2010, 12:44 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:
and congratulations with your new book,
Thank you, and good luck with SQL 2008. Hope it works out this time.

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 April 23rd, 2010, 12:54 PM
Authorized User
 
Join Date: Apr 2009
Posts: 48
Thanks: 16
Thanked 0 Times in 0 Posts
Default succes!

Hi again Imar,

I just finished installing sql server 2008 again, and this time it worked perfectly, the attach dialogue opened straight away.
The good part is that this time my Administrator account has been granted a sysadmin server role, without even touching the settings, or using the sa account with password!?

Well, I guess even after braking my brain over this for 8 hrs I can't complain because it is afterall the free express version....

Robin





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Management Studio Error! everest SQL Server 2005 0 August 14th, 2008 12:13 PM
cannot attach to databases with SQL Server Full dhx10000 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 October 30th, 2007 04:28 PM
attach database in SQL server express manag studio bruhnf SQL Server 2005 0 March 14th, 2006 08:37 AM
Attach The database on oracle server Israr SQL Server 2000 0 September 8th, 2005 03:30 AM
Unable to attach to the process drdexter33 VB.NET 2002/2003 Basics 3 September 26th, 2004 10:04 PM





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