Showing posts with label execute. Show all posts
Showing posts with label execute. Show all posts

Tuesday, March 20, 2012

Custom SQL library ?

Hi All
Does anyone know of a library for .Net that would allow to execute SQL
statements and scripts against SQL server and Oracle databases. The
general purpose will be to execute DDL statements, create procedures
tables etc, currently we use osql and sqlplus invocations with
parameters from .Net environment.
The ADO .Net has some limitations and I am unable to use it.
Tom.I guess it depends on what your reasons are for not being able to use
ADO.Net. I imagine that any other library would connect in a very similar
way.
"Tom" <mutobo@.interia.pl> wrote in message
news:1149579157.093610.119170@.i40g2000cwc.googlegroups.com...
> Hi All
> Does anyone know of a library for .Net that would allow to execute SQL
> statements and scripts against SQL server and Oracle databases. The
> general purpose will be to execute DDL statements, create procedures
> tables etc, currently we use osql and sqlplus invocations with
> parameters from .Net environment.
> The ADO .Net has some limitations and I am unable to use it.
> Tom.
>|||Tom
Well, you are going to use SELLECT/UPDATE/DELETE statements ONLY , I mean
not to use stored procedures.
BL passes "SELECT <> FROM Table" on DAL and it sends the statement to the
database
"Tom" <mutobo@.interia.pl> wrote in message
news:1149579157.093610.119170@.i40g2000cwc.googlegroups.com...
> Hi All
> Does anyone know of a library for .Net that would allow to execute SQL
> statements and scripts against SQL server and Oracle databases. The
> general purpose will be to execute DDL statements, create procedures
> tables etc, currently we use osql and sqlplus invocations with
> parameters from .Net environment.
> The ADO .Net has some limitations and I am unable to use it.
> Tom.
>|||Well as I said I will mainly use the library to transport DDL
statements. I would like to create procedures (oracle packages), tables
etc. This is not possible in ADO.NET due to for example script length
limitations ( 2000 chars, any table definition can be longer ) and for
oracle there is no support for ';' character as a statement
separator. I would like to take a script file that for example creates
a table with all references and successfully run it to the database ?
Tom.

Friday, February 24, 2012

Custom code executed when user exports to PDF

Hi,

Is there a way to execute custom code when a user exports a report to PDF? I have an assembly that writes the pages numbers to a database table in order to create a Table of contents. This works great except that the code is called when the report is initially created so the page numbers are written to the database. Then when the user clicks to export to PDF, the PDF page numbers (the ones I want to keep) are written to the database and conflict with the first set of page numbers. Is there any way that I can only call the custom assembly with the export to pdf option is chosen? Or execute code that will truncate the table before exporting to PDF?

Any suggestions?

Thanks in advance,

Amy Bolden

Chosen from where? If this is a custom application and use the ReportViewer controls, you could sink the ReportExport event. You can always call a stored procedure that preps the database too.

Friday, February 17, 2012

Custom Assembly

When I execute my report on my web server, I can see the data that requires a
query to the custom assembly. I have got "#Error".
When I execute my report in the Preview window my date is present.
My Assembly is reference to the C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\MyAssembly.dll is defined on My
Reports
I put my custom Assembly in the forlder C:\Program Files\Microsoft SQL
Server\80\Tools\Report Designer and in C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer.
I added the <CodeGroup> to C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\rssrvpolicy.config :
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MyAssembly.dll"
/>
</CodeGroup>
Can you help me ?You should throw your assembly into C:\Program Files\Microsoft
SQL\Server\MSSQL\Reporting Services\ReportServer\bin as well. Try that.
Also, are you referencing shared or nonshared methods on the assembly?
Carolyn|||My assembly is allready into
C:\Program Files\Microsoft SQL\Server\MSSQL\Reporting
Services\ReportServer\bin
and into C:\Program Files\Microsoft SQL Server\80\Tools\Report Designer\bin
The method on the assembly is shared.
When I execute my report on the preview window, all is good.
When I execute my report on my web site, I have got "#Error"
"Carolyn Vo" wrote:
> You should throw your assembly into C:\Program Files\Microsoft
> SQL\Server\MSSQL\Reporting Services\ReportServer\bin as well. Try that.
> Also, are you referencing shared or nonshared methods on the assembly?
> Carolyn|||http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_rdl_8mue.asp
"Karine" <Karine@.discussions.microsoft.com> wrote in message
news:FFBDC97F-523F-42E7-BA80-C777457F8980@.microsoft.com...
> My assembly is allready into
> C:\Program Files\Microsoft SQL\Server\MSSQL\Reporting
> Services\ReportServer\bin
> and into C:\Program Files\Microsoft SQL Server\80\Tools\Report
> Designer\bin
> The method on the assembly is shared.
> When I execute my report on the preview window, all is good.
> When I execute my report on my web site, I have got "#Error"
>
> "Carolyn Vo" wrote:
>> You should throw your assembly into C:\Program Files\Microsoft
>> SQL\Server\MSSQL\Reporting Services\ReportServer\bin as well. Try that.
>> Also, are you referencing shared or nonshared methods on the assembly?
>> Carolyn|||I read this doc and I try to do what is writen on it ... but i only have
#error.
I hope that i do something bad but i don't know what.
- My assembly is define on y report.
- I copy my dll on my WebServer : C:\Program Files\Microsoft SQL
Server\MSSQL\Reporting Services\ReportServer\bin
- I try to modify my modify the file : rssrvpolicy.config : I add :
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCustomAssemblyCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MyAssembly.dll"
/>
</CodeGroup>
I don't know if i put this code on the right place.
Can you help me more ?
"Yoshi" wrote:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_rdl_8mue.asp
>
>
> "Karine" <Karine@.discussions.microsoft.com> wrote in message
> news:FFBDC97F-523F-42E7-BA80-C777457F8980@.microsoft.com...
> > My assembly is allready into
> > C:\Program Files\Microsoft SQL\Server\MSSQL\Reporting
> > Services\ReportServer\bin
> > and into C:\Program Files\Microsoft SQL Server\80\Tools\Report
> > Designer\bin
> >
> > The method on the assembly is shared.
> > When I execute my report on the preview window, all is good.
> > When I execute my report on my web site, I have got "#Error"
> >
> >
> > "Carolyn Vo" wrote:
> >
> >> You should throw your assembly into C:\Program Files\Microsoft
> >> SQL\Server\MSSQL\Reporting Services\ReportServer\bin as well. Try that.
> >> Also, are you referencing shared or nonshared methods on the assembly?
> >>
> >> Carolyn
>
>