Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Monday, March 26, 2012

How much good practice is to user asp:SqlDataSource

I know that <asp:SqlDataSource> is fast, but is it a good practice to use this. The sqldatasource is right there in the aspx page and the SQL for sqldatasource is also right there.

Does that not break the 3 tier model, as normally we call a database layer and we have all the SQL's there.

In one of the code in saw the following. I don't know if it is a good practice to do something like this.

<asp:DropDownList ID="CountryDropDownList" runat="server" DataSourceID="SqlDataSource2" DataTextField="PickListLabel" DataValueField="PickListValue" OnDataBound="hidePanel">
</asp:DropDownList>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:webrepos %>"
SelectCommand="SELECT [PickListLabel], [PicklistValue] FROM [PickList_Values] WHERE (([ObjectName] = @.ObjectName) AND ([FieldName] = @.FieldName)) ORDER BY [AbbrCode]">
<SelectParameters>
<asp:Parameter DefaultValue="Account" Name="ObjectName" Type="String" />
<asp:Parameter DefaultValue="Country__c" Name="FieldName" Type="String" />
</SelectParameters>
</asp:SqlDataSource>

If your application doesn't require a business layer, then you could probably use a SqlDataSource safely with stored procedures. However, if you plan on moving to a tiered architecture, then I'd move to an ObjectDataSource which will allow you full flexibility on how you want to access your data.

|||

sahajMarg:

Does that not break the 3 tier model

My current personal site uses the SqlDataSource. I wanted to get something up quickly. I built the site in a few evenings (including the rudimentary backend). If I had decided not to "break the 3 tier model" and opted for custom business objects, it would have taken me a fair bit longer. The SqlDataSource was the perfect choice, given the circumstances. Like Ed suggests, I use stored procedures. But with only a dozen or so pages in the site, I didn't need to. The 3 Tier model is inappropriate in my case.

Having said that, I am toying with the idea of rebuilding it over Christmas with LINQ.


|||

I use both. I tend to use SqlDatasources for filling simple things like dropdowns, gridviews, etc.

But when I need to do complex logic, or non-trivial updates (updating multiple tables that requires transaction support) then I'll skip the SqlDatasource and call my DAL methods directly.

I'm not a big fan of the 3 Tier model to begin with, but it does have its place. It's just that place isn't where I sit usually, but I've been on projects where it was appropriate. That said, I'm also not a huge fan of stored procedures either. In most of my recent work, security is a niceity. There is no real privacy issues, or critically sensitive data involved, but changes come quick. Request, to implementation, to roll out is measured in days, and the simplicity of having inlined SQL where it can all be versioned as a singular unit far out weighs the benefits on my current projects.

If the project holds customer data, credit card information, medical records, or other such sensitive data then I'd probably recommend stored procedures, and possibly a 3 tier approach. If the project involved multiple programmers, developers, and designers then I might recommend a 3 tier approach especially if one or more of them can be focused on the backend data storage.

|||

I'm not keen on fiddling around in the back of a SqlDataSource. I don't know why - it's just a "thing" with me. Where I can't drag, drop, configure and forget, I'll switch to using my helper methods instead.

|||

mike thanks for your reply. now it perfectly makes sense.

Monday, March 19, 2012

How many CALs for a web page?

Is there any way to know aprox. how many cals a DB should have for an
avg website. I don't really know how many concurrent users there will
be.Hi

You would need to confirm this with you software supplier, but I think you
should be looking for a processor licence rather than CAL see
http://www.microsoft.com/sql/howtob...rlicensing.mspx

John

<wackyphill@.yahoo.com> wrote in message
news:1135697473.411563.197280@.g43g2000cwa.googlegr oups.com...
> Is there any way to know aprox. how many cals a DB should have for an
> avg website. I don't really know how many concurrent users there will
> be.|||wackyphill@.yahoo.com wrote:

> Is there any way to know aprox. how many cals a DB should have for an
> avg website. I don't really know how many concurrent users there will
> be.

For a public site you need a processor licence. (likely cheaper than a
CAL per visitor anyway!)

See:
http://www.microsoft.com/sql/howtobuy/default.mspx

--
David Portas
SQL Server MVP
--|||You'll need to liecence per physical processor in the box you are running
SQL on.

Alternatively, you could look at using SQL 2005 Express edition which you
can use for free but it has some limitations, check out
http://microsoft.com/sql for more information.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials

<wackyphill@.yahoo.com> wrote in message
news:1135697473.411563.197280@.g43g2000cwa.googlegr oups.com...
> Is there any way to know aprox. how many cals a DB should have for an
> avg website. I don't really know how many concurrent users there will
> be.

Friday, March 9, 2012

how lmit - control output of dtexec ?

Hi,

we have job that execute SSIS (s) using dtexec and save output(s) to file

Output of SSIS is 4 page long full of entries like

Validating: 0% ..ProgressProgress: .. Prepare for Execute: 100%

1. Can I limit output to show only success or failure ?
2. Can I redirect output of dtexec to be saved in msdb insted of showing after execution.


Thank you

Alex

Alex_UTL wrote:

1. Can I limit output to show only success or failure ?

dtexec has an option /Rep (or /Reporting) that lets you select the events you want reported.

/Rep[orting] Level[;EventGUIDOrName[;EventGUIDOrName[...]]
Level = N or V or any one or more of E, W, I, C, D, or P.

'/Reporting E' shows only errors, '/Reporting W' shows warnings, etc. I think success or failure is reported regardless of the option. Try the option N and see if that helps.

Check out Book online entry for dtexec utility.

Alex_UTL wrote:

2. Can I redirect output of dtexec to be saved in msdb insted of showing after execution.

I think this is better done in the package, but there is a '/Logger' command line option for dtexec which you can try.

Friday, February 24, 2012

How i should show toolbar

Hi group,
First time i am using reportservice.render method to render the report in my
aspx page. Here is the code snippet
result = rs.Render(report,"HTML4.0",null,null,paramValue,credentials,null,out
encoding,out mimetype,out paramvalues,out warning,out streamidsh.SessionId = rs.SessionHeaderValue.SessionId;
Response.BinaryWrite(result);
by doing so i am getting all the pages on the same aspx page and no tool
baar is shown. I also tried by passing toolbar = true in device info string
but no result.
So what i should do to show the toolbar .
Thanks
SandeepHi group,
i find this in msdn
If you render a report to HTML using the Render method, you cannot use the
report viewer toolbar as you can with a report that is rendered using URL
access. However, the Toolbar device information setting still affects the
appearance of the report. If you set Toolbar to a value of true, the report
server only renders the first page of the HTML report. If you set the value
to false, the report server renders all pages into a single Web page, using
<HR> tags as page delimiters.
Is there any work around.
Please help me out
Sandeep Garg
"Sandeep" <sandeep.garg@.approva.net> wrote in message
news:%23BBQR999EHA.3988@.TK2MSFTNGP11.phx.gbl...
> Hi group,
> First time i am using reportservice.render method to render the report in
> my aspx page. Here is the code snippet
> result => rs.Render(report,"HTML4.0",null,null,paramValue,credentials,null,out
> encoding,out mimetype,out paramvalues,out warning,out streamidsh.SessionId
> = rs.SessionHeaderValue.SessionId;
> Response.BinaryWrite(result);
> by doing so i am getting all the pages on the same aspx page and no tool
> baar is shown. I also tried by passing toolbar = true in device info
> string but no result.
> So what i should do to show the toolbar .
> Thanks
> Sandeep
>|||The toolbar is only available via URL access. If you are getting a rendered
report using the webservice, you will have to implement your own toolbar.
"Sandeep" <sandeep.garg@.approva.net> wrote in message
news:uTbKJl%239EHA.3120@.TK2MSFTNGP12.phx.gbl...
> Hi group,
> i find this in msdn
> If you render a report to HTML using the Render method, you cannot use the
> report viewer toolbar as you can with a report that is rendered using URL
> access. However, the Toolbar device information setting still affects the
> appearance of the report. If you set Toolbar to a value of true, the
> report server only renders the first page of the HTML report. If you set
> the value to false, the report server renders all pages into a single Web
> page, using <HR> tags as page delimiters.
> Is there any work around.
> Please help me out
> Sandeep Garg
> "Sandeep" <sandeep.garg@.approva.net> wrote in message
> news:%23BBQR999EHA.3988@.TK2MSFTNGP11.phx.gbl...
>> Hi group,
>> First time i am using reportservice.render method to render the report in
>> my aspx page. Here is the code snippet
>> result =>> rs.Render(report,"HTML4.0",null,null,paramValue,credentials,null,out
>> encoding,out mimetype,out paramvalues,out warning,out
>> streamidsh.SessionId = rs.SessionHeaderValue.SessionId;
>> Response.BinaryWrite(result);
>> by doing so i am getting all the pages on the same aspx page and no tool
>> baar is shown. I also tried by passing toolbar = true in device info
>> string but no result.
>> So what i should do to show the toolbar .
>> Thanks
>> Sandeep
>>
>|||Thaks for the suggestion.
Can u give me some clue how to implement my own toolbar. From where i got
the total page count and all the other required stuff.
Sandeep
"FNDS" <absolutelynospam@.nodomain_.com> wrote in message
news:exk34%23%239EHA.3616@.TK2MSFTNGP11.phx.gbl...
> The toolbar is only available via URL access. If you are getting a
> rendered report using the webservice, you will have to implement your own
> toolbar.
> "Sandeep" <sandeep.garg@.approva.net> wrote in message
> news:uTbKJl%239EHA.3120@.TK2MSFTNGP12.phx.gbl...
>> Hi group,
>> i find this in msdn
>> If you render a report to HTML using the Render method, you cannot use
>> the report viewer toolbar as you can with a report that is rendered using
>> URL access. However, the Toolbar device information setting still affects
>> the appearance of the report. If you set Toolbar to a value of true, the
>> report server only renders the first page of the HTML report. If you set
>> the value to false, the report server renders all pages into a single Web
>> page, using <HR> tags as page delimiters.
>> Is there any work around.
>> Please help me out
>> Sandeep Garg
>> "Sandeep" <sandeep.garg@.approva.net> wrote in message
>> news:%23BBQR999EHA.3988@.TK2MSFTNGP11.phx.gbl...
>> Hi group,
>> First time i am using reportservice.render method to render the report
>> in my aspx page. Here is the code snippet
>> result =>> rs.Render(report,"HTML4.0",null,null,paramValue,credentials,null,out
>> encoding,out mimetype,out paramvalues,out warning,out
>> streamidsh.SessionId = rs.SessionHeaderValue.SessionId;
>> Response.BinaryWrite(result);
>> by doing so i am getting all the pages on the same aspx page and no tool
>> baar is shown. I also tried by passing toolbar = true in device info
>> string but no result.
>> So what i should do to show the toolbar .
>> Thanks
>> Sandeep
>>
>>
>|||Hmm. I haven't tackled creating my own toolbar to show a rendered report.
If someone has and is willing to share, please post a sample or URL...
Thx
"Sandeep" <sandeep.garg@.approva.net> wrote in message
news:%23gB0X$F%23EHA.2112@.TK2MSFTNGP10.phx.gbl...
> Thaks for the suggestion.
> Can u give me some clue how to implement my own toolbar. From where i got
> the total page count and all the other required stuff.
> Sandeep
> "FNDS" <absolutelynospam@.nodomain_.com> wrote in message
> news:exk34%23%239EHA.3616@.TK2MSFTNGP11.phx.gbl...
>> The toolbar is only available via URL access. If you are getting a
>> rendered report using the webservice, you will have to implement your own
>> toolbar.
>> "Sandeep" <sandeep.garg@.approva.net> wrote in message
>> news:uTbKJl%239EHA.3120@.TK2MSFTNGP12.phx.gbl...
>> Hi group,
>> i find this in msdn
>> If you render a report to HTML using the Render method, you cannot use
>> the report viewer toolbar as you can with a report that is rendered
>> using URL access. However, the Toolbar device information setting still
>> affects the appearance of the report. If you set Toolbar to a value of
>> true, the report server only renders the first page of the HTML report.
>> If you set the value to false, the report server renders all pages into
>> a single Web page, using <HR> tags as page delimiters.
>> Is there any work around.
>> Please help me out
>> Sandeep Garg
>> "Sandeep" <sandeep.garg@.approva.net> wrote in message
>> news:%23BBQR999EHA.3988@.TK2MSFTNGP11.phx.gbl...
>> Hi group,
>> First time i am using reportservice.render method to render the report
>> in my aspx page. Here is the code snippet
>> result =>> rs.Render(report,"HTML4.0",null,null,paramValue,credentials,null,out
>> encoding,out mimetype,out paramvalues,out warning,out
>> streamidsh.SessionId = rs.SessionHeaderValue.SessionId;
>> Response.BinaryWrite(result);
>> by doing so i am getting all the pages on the same aspx page and no
>> tool baar is shown. I also tried by passing toolbar = true in device
>> info string but no result.
>> So what i should do to show the toolbar .
>> Thanks
>> Sandeep
>>
>>
>>
>

How I can get the rdl file from one application

Hi all,
I want to do a aspx page who host the report inside of a frame. I need get
the rdl definition from the server thru of the application.
Can I get the rdl thru web services?
I don't want to do the report manager.
Thanks
Manuel JorgeUse the GetReportDefinition of the web service:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_2eew.asp
--
Adrian M.
MCP
"Manuel" <Manuel@.discussions.microsoft.com> wrote in message
news:ADE6F672-0E45-474E-BBDF-F5D51810C9D3@.microsoft.com...
> Hi all,
> I want to do a aspx page who host the report inside of a frame. I need get
> the rdl definition from the server thru of the application.
> Can I get the rdl thru web services?
> I don't want to do the report manager.
> Thanks
> Manuel Jorge
>