Showing posts with label programatically. Show all posts
Showing posts with label programatically. Show all posts

Friday, February 24, 2012

Best way to tell if a SP is a query Programatically

Using ADO.NET Or regular queries on SQL Server, is there a good way of
determining if a Stored Proc will be returning a result set or if it is
a non-query that does all I/O through parameters?

Thanks.Hi

You should know this when you program your data access routines and a
recordset needs to be declared to hold the resultset. If the parameters are
input/output/result then they need to be declared accordingly. You may look
at the syscolumns table that has a isoutparam column that will determine if
a parameter is an output parameter.

John
<wackyphill@.yahoo.com> wrote in message
news:1126884177.488723.219470@.g43g2000cwa.googlegr oups.com...
> Using ADO.NET Or regular queries on SQL Server, is there a good way of
> determining if a Stored Proc will be returning a result set or if it is
> a non-query that does all I/O through parameters?
> Thanks.

Tuesday, February 14, 2012

Best way to launch report from a C# Winforms app?

I'm new to SSRS. I would like to launch a report from a C# desktop application, supplying parameters programatically. I was able to do this using System.Diagnostics.Process p ... then p.Start(@."(path)\iexplore.exe","(reportURL)"); I'm betting there's a much better way to do this.

Ideally I would like to create an IE window that shows only the report, that is, only the report viewer toolbar is visible, the IE toolbars and menus are hidden. I want to specify IE as the browser in case some other browser is installed as the default web browser.

Can anyone link me to a tutorial or provide a code snip? Thanks.Hi do not launch in IE. use ReportViewer Control to see that. You can add reports to your application by adding from Add Web Reference.|||Alas, it is at present still a .Net 1.1 application. I'll use ReportViewer when I upgrade it to .Net 2.0. In the meantime I'll launch IE to view the report. I tried to use SendKeys.Send to send F11 to get IE in fullscreen mode, but SetForegroundWindow did not work when given the Handle property of the process object returned by Process.Start.

Thanks for your response.