Showing posts with label multiple. Show all posts
Showing posts with label multiple. Show all posts

Tuesday, March 27, 2012

Ho do I allow multiple users to share a SQL 2005 Express database?

Hello,

Ho do I allow multiple users to share a database?

Background

I have developed a Windows App in VS.NET 2005 which connects to a SQL 2005 Express database.

Now I want to install the app and database on the network and I am getting an error "File 'file_name' is on a network device not supported for database files"

What is the best way to get this working

Thanks in advance,

Phil

Sorry, please find my connection string below. (Note that Z:\ is my network share)

Data Source=.\SQLEXPRESS;AttachDbFilename="Z:\Data\SurveyDB.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

Thanks,

Phil

|||do you really need it as user instance, i suggest that you attach the database to the main instance of sqlexpress and modify your connection string. user instance bahaves differently since everytime an applicaqtion is calling this method, the calling application spawns a service to the installed sql server express and makes the user of the calling application its administrator|||

Hi, and thanks for your prompt reply,

It seems that I am only just learning about the different types of connections!

How do I attach the database to the main instance of SQL Express? And then what would an example of my connection string be?

Thanks

Phil

|||

OK, I somehow have made a "main instance" of the database, and have changed my connection string to Server=LAPTOP\SQLEXPRESS;Database=SurveySystemsDB;Trusted_Connection=True

BUT I have no idea on how I "converted" my database from its original "User Instance" to the "main instance"

Can anybody tell me how to do this?

Thanks,

Phil

|||

Hi Phil,

User Instances are not about the database, it's about the server itself. A User Instance is a special instance of SQL Express that is started up at run-time; you can read about the details in the User Instance white paper. You can not actually share a User Instance between multiple users, they are designed to only allow local access.

The way you "converted" your database is simply by attaching it to your main instances of SQL Express rather than trying to attach it at run time using a connection string. Since I wasn't there when you attached your file, I couldn't tell you how you did it. The normal ways of attaching a database are to run T-SQL script, such as using sp_attach_db or by using a GUI tool such as Management Studio Express to attach the database.

Once a database is attached to a server, you appliction simply makes a connection as you've demonstrated above.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

sql

Wednesday, March 7, 2012

Hiding/Showing columns based on the columns present in the dataset

I have query which retrieves multiple column vary from 5 to 15 based on input parameter passed.I am using table to map all this column.If column is not retrieved in the dataset(I am not talking abt Null data but column is completely missing) then I want to hide it in my report.

Can I do that?

Any reply showing me the right way is appricited.

-Thanks,

Digs

In the Column properties, expand the Visibility section, and then click on Hidden, and choose Expression.

In the expression, use the same input parameters that you are using to build the column list in your SQL Statement to set the property.

An example expression might look like this:

=iif(Parameters!ShowColumn1.Value= True, false, true)

Where Parameters!ShowColumn1 is a report parameter that you have defined,

This should get you started...

BobP

|||

Hi,

Thanks for the reply..Need bit change =IIf(Fields!Collection.IsMissing=True,True,False) In Visibility -- > Hidden

-Thanks,

Digs

Sunday, February 26, 2012

hiding Table Rows

Is it possible to determine whether or not another row in a table is visible? The example is in a multiple detail row table, where I want to display a 'header' row (really just another detail row), if any of the other detail rows in the 'section' are visible.  Is there some syntax like ReportItems!TableRow7.property("Hidden")=?? that I could use to determine the visibility state of a row?Thanks
Anil
Hi,
in Layout Tab, select the row and in the Property Panel select Visibility -> Hidden -> Expression.
Best Regards
|||

Thanks for your response but it does not solve my problem.

My Problem is I have master detail records.

If detail records are not existing then I have to make the master row invisible

Could anybody help me out fom this problem.

Ofcourse I solved it by modifying the database query but still want the solution of this problem

Thanks

Anil

|||

Hi...Yes u can hide the Rows using If Expressions...do onething...what ever the textbox u want hide...go.
1)..selct Property Window(F4) ...
2) then click Visibility -> hidden -> Select <Expressin..>
then write like this....I am writting One Example Only.....use this...

=iif(ReportItems!textbox2.Value="Y",False,True)
False-- Visible
True- Hide of textbox
U cAN WRITE FOR ANY THING....
Ok..Good Luck...

Sunday, February 19, 2012

hiding columns in a matrix

I am building a matrix report that has fiscal quarters as the column group. I
have multiple data columns within the group. I am trying to allow the report
user to choose which data is displayed by using a parameter. I am able to
hide the columns of data that are not selected but the fiscal quarter labels
remain. Is there a way to limit the column group headers to only the visible
columns?You can hide the controls by setting the Visible option for that control. You
may have to use an expression so that the control is visible when it
satisfies the condition. See how 'iif' can be used in report programming MSDN
documentation.
HTH
Rajesh
MCSD.NET
http://meenrajan.blogspot.com
"KenBo" wrote:
> I am building a matrix report that has fiscal quarters as the column group. I
> have multiple data columns within the group. I am trying to allow the report
> user to choose which data is displayed by using a parameter. I am able to
> hide the columns of data that are not selected but the fiscal quarter labels
> remain. Is there a way to limit the column group headers to only the visible
> columns?

Hiding a row in a table based on whether another row is hidden

Is it possible to determine whether or not another row in a table is visible?
The example is in a multiple detail row table, where I want to display a
'header' row (really just another detail row), if any of the other detail
rows in the 'section' are visible. Is there some syntax like
ReportItems!TableRow7.property("Hidden")=' that I could use to determine the
visibility state of a row?
ThanksDid you find a solution on your problem? I have a simular problem.
"PD" wrote:
> Is it possible to determine whether or not another row in a table is visible?
> The example is in a multiple detail row table, where I want to display a
> 'header' row (really just another detail row), if any of the other detail
> rows in the 'section' are visible. Is there some syntax like
> ReportItems!TableRow7.property("Hidden")=' that I could use to determine the
> visibility state of a row?
> Thanks|||I have the same problem. Is there any on
"aCa" wrote:
> Did you find a solution on your problem? I have a simular problem.
> "PD" wrote:
> > Is it possible to determine whether or not another row in a table is visible?
> > The example is in a multiple detail row table, where I want to display a
> > 'header' row (really just another detail row), if any of the other detail
> > rows in the 'section' are visible. Is there some syntax like
> > ReportItems!TableRow7.property("Hidden")=' that I could use to determine the
> > visibility state of a row?
> >
> > Thanks