Showing posts with label solution. Show all posts
Showing posts with label solution. Show all posts

Monday, March 26, 2012

max connections pool reached

Hi,
Can anyone tell me if he ever got this issue and how he get the solution. In my asp.net 2.0 application i close always ma connexions to sqlserver in the finally clause (the open is in the try); I open 1 ou 2 connecxions per aspx page, i close them always (in the finally clause or at the bottum of the form). Sometimes, the application is down with the message
Can not open a new connexion, max pool size is reached !!!!

I host my application on a remote server, i have no performance issues, only this great problem !!!
i cant view the status of connexion on the sqlserver, so what can i do, or how shoud i develop my connection.
thanks in advance to all of yuo who will help me.
Imed.

Please visithttp://www.15seconds.com/issue/040830.htm as it has some connection pool optimization tips.

Hope that helps.

Monday, March 12, 2012

Matrix grouping/visibility

I have tried several combinations, but I can't quite figure out the solution to this one. I have a matrix set up that is giving me the results I want, but I need to do a conditional visibility and still have what I need.

I have a column that is filled with operation numbers and a row that is filled with item numbers. The detail is for work centers and it shows where each of them fall in the grid. I need to say to show all work centers that apply where the workcenter parameter matches. I was able to filter and say only show me this workcenter, but I want to show just those, but then if this workcenter would show up, show me the rest.

BJ

bj

By right click on the detail column and selecting properties. You have access to the visiblility tab, on the tab, you have expression. You can use the expression to control what is display and what is hide.

Hammer.

Friday, March 9, 2012

Matrix Column Grouping

What would be the best solution to accomplish the following?
The report would look as follows
Year 1 Total Year 2
Month 1 Month 2
Total items 25 12 5
Item type 1 8 9 4
Item type 2 7 2 3
Item type 3 9 5 1
When you click on the Year 1 totals, the detail months should expand
and shift everything to the right.
Just like in a table, you can hide the detail rows of a table, I would
like to hide/unhide the detail columns of a Matrix. However, when I go
to toggle the visibility of the column like I toggle the visibility of
a row in a table, it only hides the column header (obviously because
it's only toggling the visibility of the textbox itself instead of the
entire column). Is there any way to toggle the visibility of a column
in the same manner you do a row in table?
This could also be accomplished with a Table, utilizing static columns,
but that is not ideal.
In Excel, all that needs to be done is to is to group the headers, and
use the new group field to display the PivotTable headers.
Is there an easier/better way to accomplish what I'm trying to do?After hours of searching, shortly after I wrote this, I found the
answer here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rshowto/htm/hrs_designer_v1_0zvx.asp
So nevermind.

Monday, February 20, 2012

master with two detail views

Hello community,

I think my problem is easy to solve even though I did not find a solution through different tutorials and help pages. Here it is (select statements are hier simplified):

In the gridview "GridView1" I have a master record with person_id, which is the data-key-value. There is also another id-field named task_id (This record comes from a database view which joins the persons- and the tasks- table)

SelectCommand="SELECT [id], [person_id], [task_id] FROM [ViewPersonTasks] WHERE ([id] =@.id)"

For both fields I want to display details in two different detail-views. One for the person (depending on person_id) and one for the tasks (depending on the task_id).

The first one is easy. I declare a details-view for the person data based on a SqlDataSource with a control-parameter like this:

SelectCommand="SELECT [person_id], [first_name], [last_name], [birth_date] FROM [TabPersons] WHERE ([person_id] = @.person_id)"

...


<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="person_id" PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>

But now the problem: how should I declare a parameter @.task_id for the task_id, so that the second select statement for the tasks-details-view retrievs the data for the tasks:

SelectCommand="SELECT [task_id], [task_name],[task_date], [task_description] FROM [TabTasks] WHERE ([task_id] =@.task_id)"

@.task_id should have the value from the task_id-field of the master record, displayd in the master grid-view.

Thank you in advance for your help


Hello,

I found the solution on my own.

Within the properties of the gridview with the master records the property "datakeyname" must contain both keys: person_id;task_id

And in the second details datasource the task_id can be referenced as the second (index) within the selecteddatakey-collection in a select/control paramter like this:

<SelectParameters>
<asp:ControlParameter ControlID="GridView1" Name="task_id" PropertyName="SelectedDataKey(1)" />
</SelectParameters>

Perhaps this may help someone else here.

regars

dieter