Wrox Programmer Forums
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals 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 August 2nd, 2008, 05:55 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default User Instance=True

Hello friends I am using a connection string which is like this


string ConStr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\IT_Masters \DB\IT\Dot_Net_Programmes\VS 2008\Testing\App_Data\MyDatabase.mdf;Integrated Security=True;User Instance=True";


will u tell me pls what is the meaning of
User Instance=True

because if i dont use it I am getting error...


thanks!!

DPK..
__________________
DPK..
 
Old August 2nd, 2008, 06:14 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you consider a Google search for this? The number 1 hit for the search query "User Instance=True" is a Microsoft white paper detailing the specifics of user instances.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old August 2nd, 2008, 06:20 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

ya i did but didnt get much few things i came to know that this User Instance only work when Integrated Security is TRUE and more but i am still confused..see it
---------------------------------
If the database file is already attached to the SQL Server instance, the connection is opened to the existing database.

This is a great option because if you are an administrator, you can attach and connect to a database file by specifying the file name in the connection string in your application. Many developers run as administrators on their systems so AttachDBFilename works well for them. The problem is that Microsoft strongly recommends NOT running as an administrator because this reduces the amount of damage that can be inflicted by a virus. What we need in this case is a way to use AttachDBFilename without being a member of the Windows Administrators group. The solution is the User Instance feature.
------------------------------------------------------

can u please make me understnad obove that...

DPK..
 
Old August 2nd, 2008, 06:37 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

What part of that is not clear?
Quote:
quote:What we need in this case is a way to use AttachDBFilename without being a member of the Windows Administrators group.
This is the main idea; it allows users with low privileges to attach databases to SQL on the fly.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old August 2nd, 2008, 08:11 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default

so can i connect my mdf file without using "User Instance=True" ?

DPK..
 
Old August 2nd, 2008, 08:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, but you'll need to attach the MDF to SQL Server first, with an account that has sufficient permissions....

Maybe this helps?

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old January 22nd, 2009, 11:02 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default stream reader function..

Hello friends can u pls tell me the details of
streamreader.read( buffer : byte[], offset : int, count : int )
function's argument

waiting for reply!!!
__________________
DPK..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Failed to generate a user instance of SQL Server naeem.net SQL Server 2005 3 December 11th, 2009 02:45 PM
SQL user instance error ckerin BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 April 28th, 2008 12:30 AM
SQL Express User Instance...avoiding aspdewd SQL Server 2005 1 October 27th, 2007 10:12 PM
Error to change user instance csharpa SQL Server 2005 1 February 10th, 2007 09:44 AM
Stupid but true Adam H-W SQL Server 2000 3 December 6th, 2003 12:16 PM





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