Showing posts with label analyser. Show all posts
Showing posts with label analyser. Show all posts

Friday, March 30, 2012

Report parameter with datetime

Hi,

Anyone can help me?

I created a store proc with @.startdate and @.enddate

in query analyser - I run it as Exec SP_Admission '2006/01/01','2006/01/25' and it is ok.

Then I created a report in VS2005 and set the parameter as datetime in report parameter.

if I manually force to fill startdate and enddate with ‘yyyy/mm/dd’ format in preview, it works.

However if I choose the date from the given calendar(Date Time Picker), it doesn’t work

it is said that "The value provided the report parameter 'enddate' is not valid for its type.

Of course it not valid because it always comes with ‘dd/mm/yyyy’ format

I didn't setup the date time picker, it will automatically when I choose datetime as datatype.

any idea what should I do?

thanks,

Susan

Hi Susan,

not exactly brilliant, but

Exec SP_Admission convert(datetime,'12/10/2006',103),convert(datetime,'12/11/2006',103)
should work in your case, so put your parameter instead of '12/10/2006'
|||

Thanks...

someone suggested that in my SP -

I declare as varchar then in where statement I convert it as you mention.

however in report para - I can't set it as datetime but set to string.

it works ok but I can't use the date time picker .

well at least works that way...

Thanks so much

Monday, March 26, 2012

Report of the Best Prctice Analyser

First of all I have to say THANK YOU to Microsoft for that tool.
It is a great tool for managing SQL databases - we got many many intersting
hints to enhance our SQL servers.
Using that tool we now got two interesting things:
On our server we're also hosting the Sharepoint databases of the Sharepoint
Services - a Microsoft product!
When scanning the server with BPA the most reported databases were the
Sharepoint databases! I gave this information to Mike Fitzmaurice of the
Sharepoint team yet!
But we have an own problem too! Maybe someone can help:
We had (don't know why!) some tables an stored procedures in our master
database - BPA told us this!
Then we dropped these objects because we don't need them.
Now BPA tells us that 2 user objects remained in the master database:
Scan Details
...
Object Name Object Type Object Type Description
pk_dtproperties PK PRIMARY KEY constraint
DF__dtpropert__versi__4A0EDAD1 D Default or DEFAULT constraint
...
How can we get rid of these objects?
Many thanks in advance
Thomas
Seems like these constraints are associated with a table dt_properties (used
for storing database diagrams). Can you check if this exists in your master
database?
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Mueller-Lynch Thomas" <MuellerLynchThomas@.discussions.microsoft.com> wrote
in message news:63A92A40-BF14-4DE6-B43B-30C400266365@.microsoft.com...
First of all I have to say THANK YOU to Microsoft for that tool.
It is a great tool for managing SQL databases - we got many many intersting
hints to enhance our SQL servers.
Using that tool we now got two interesting things:
On our server we're also hosting the Sharepoint databases of the Sharepoint
Services - a Microsoft product!
When scanning the server with BPA the most reported databases were the
Sharepoint databases! I gave this information to Mike Fitzmaurice of the
Sharepoint team yet!
But we have an own problem too! Maybe someone can help:
We had (don't know why!) some tables an stored procedures in our master
database - BPA told us this!
Then we dropped these objects because we don't need them.
Now BPA tells us that 2 user objects remained in the master database:
Scan Details
...
Object Name Object Type Object Type Description
pk_dtproperties PK PRIMARY KEY constraint
DF__dtpropert__versi__4A0EDAD1 D Default or DEFAULT constraint
...
How can we get rid of these objects?
Many thanks in advance
Thomas