Showing posts with label empty. Show all posts
Showing posts with label empty. Show all posts

Friday, March 30, 2012

regarding datetime in asp.net

hi ,

i had textbox which is used to enter datetime . in the database, the data type is date/time. now my requirement is when the textbox is empty. i want 2 store a default value. which value is suitable for datetime.

i had given as follows

if textbox12.text = "" then

textbox12.text = 5/5/2000 ---- it is storing this value.

end if

but if i want 2 update this date means it is not supporting . if i select current date using calender it was saved as 12/30/1899.

can anyone help me.

regards

m.arunachalam

You can try
textbox12.Text = DateTime.Today

Wednesday, March 28, 2012

Reg: Query Performence

Below query output results time taking very much.

SELECT NON EMPTY

{[Measures].[Score]} ON COLUMNS,

NON EMPTY {

(DESCENDANTS({[Organisation].[Organisation].&[36]},0),

[Question].[Type Id].[Category Id],

[Question].[Type Description].[Category Description],

[Question].[Short Description].[Short Description]

)}

HAVING [Measures].[Points]>0 ON ROWS

FROM (SELECT [Assignment].[Id].&[1] ON COLUMNS

FROM [Sample])

Total 7 dimensions 2 measure groups

Fact Table : 18,000,00 Records

Dimensions: 2000 Records

[Organisation].[Organisation] having 9 levels

like

Level1

Level2

LEVEl3

Is there any solution to improve the query performence.Any steps to inreasing performence of cube. Please help me. this is urgent for me

Could you please rewrite your query in terms of AdventureWorks?

Wednesday, March 21, 2012

Referential Integrity with empty string and ZERO

Hi,
How could I define referential integrity using FK constraint which allow me to have empty string/ZERO number instead of NULL value ?

Thank you

If you place a foreign key constraint on a column, zero is only a valid value if there is a zero in foreign key table. The same applies to empty strings.

If the foreign key value of a particular row is unknown (or it doesnt have one), that's where the use of null comes in. Of course a NOT NULL constraint used in conjunction with the FK constraint can prevent the use of nulls (forcing a valid FK value).

To the best of my knowledge, it's not possible to change this behavior.

Referential Integrity with empty string and ZERO

Hi,
How could I define referential integrity using FK constraint which allow me to have empty string/ZERO number instead of NULL value ?

Thank you

If you place a foreign key constraint on a column, zero is only a valid value if there is a zero in foreign key table. The same applies to empty strings.

If the foreign key value of a particular row is unknown (or it doesnt have one), that's where the use of null comes in. Of course a NOT NULL constraint used in conjunction with the FK constraint can prevent the use of nulls (forcing a valid FK value).

To the best of my knowledge, it's not possible to change this behavior.

Friday, March 9, 2012

Reference Empty Data Set

I have a dataset that sometimes is empty. I have it as a detail row in a table on the report, but since the dataset is null the row does not appear. What I would like to do is have it say "No results" if there are no results, otherwise have it show the results.

I tried to add a textbox and reference the textbox on the table, but it was a no go.

Here is what I had in my textbox

<code>
=code.noRows(ReportItems!table8!textbox30)
</code>

and this is what I was using in the code

<code>
Function noRows(byVal result) as string
if result = "" then
noRows = "NO Results"
else
noRows = result
end if
end function
</code>

Can anyone assist me with how to do this?

Thanks

Try this:

Data regions (matrix, table, list, chart) have a so-called NoRows property. If set, this is the message to display in a textbox (that replaces the data region when no rows of data are available).

Note: the NoRows property is available in the VS properties window.

-- Robert

|||When I use that my header disappears. Is there a way around this?
I need the "No Results" to appear on the detail line and the header to stay regardless.

Thanks

|||

No. If you use the NoRows message property, it will replace the entire table.

-- Robert