Showing posts with label custom. Show all posts
Showing posts with label custom. Show all posts

Thursday, March 22, 2012

Calling my web service from the custom code is failing

This is what I'm trying to achieve. I want to call into my custom
assembly from the reports, and that assembly in turn calls a web
service. The reason I have to do that is because I think we can't
directly call a web service from the reports. To complicate the things
further I also have Forms Authentication enabled on Reporting
services.
Forms authentication enables me to use User!UserID which I pass on to
my custom assembly. The assembly in turn passes the parameter to web
service. To test the functionality I was trying to return simply
"Hello " + parameter value from the web service.
I have copied the custom assembly code to report manager's bin and
report server's bin directories. I have also added CodeGroup to
rssvrpolicy.config file to give a "FullTrust" permission on my custom
assembly.
The reports works as expected in Preview tab in VS.NET designer, but
when accessed from report manager or from the report server via URL,
the expression in text box shows #Error.
Please help to explain how to debug and fix the problem. Thanks much.
YogeshI have finally managed to get web service call working. I was able to
do this by asserting System.Net.WebPermission. Here's code snippet:
//Add following at the top of the class file
using System.Net;
using System.Security.Permissions;
//Add these lines just before instantiating web service proxy class
WebPermission webPerm = new
WebPermission(PermissionState.Unrestricted);
webPerm.Assert();
Remember to add exception handling code otherwise when functions in
custom code fails you will get "#Error" in the textbox in the report
without explaining what went wrong. If your methods return strings
then for debugging purposes you can return ex.ToString() which will at
least let you know what went wrong.
Yogesh|||Hi Yogesh,
Help..
Tried all of the above and still getting the #error on my report - I can
call a different function in the dll (not using a web service) and that is
fine..
Do I need to set up any policies in the rssvrpolicy.config file ?
I have added the reference in my code Web.Assert code - so it looks like I
still have problems with the config files ..
"Yogesh" wrote:
> This is what I'm trying to achieve. I want to call into my custom
> assembly from the reports, and that assembly in turn calls a web
> service. The reason I have to do that is because I think we can't
> directly call a web service from the reports. To complicate the things
> further I also have Forms Authentication enabled on Reporting
> services.
> Forms authentication enables me to use User!UserID which I pass on to
> my custom assembly. The assembly in turn passes the parameter to web
> service. To test the functionality I was trying to return simply
> "Hello " + parameter value from the web service.
> I have copied the custom assembly code to report manager's bin and
> report server's bin directories. I have also added CodeGroup to
> rssvrpolicy.config file to give a "FullTrust" permission on my custom
> assembly.
> The reports works as expected in Preview tab in VS.NET designer, but
> when accessed from report manager or from the report server via URL,
> the expression in text box shows #Error.
> Please help to explain how to debug and fix the problem. Thanks much.
> Yogesh
>

Calling External Code that returns a Dataset

I know there are ways to embed custom code into these reports, but the
examples I've seen call the custom code outside the context of
acquiring a resultset.
Suppose I've created a class/assembly that has a shared method which
returns a dataset. Is it possible to use this in my report to
generate the record set rather than calling a stored prodedure or SQL
from within the report?
RobRob,
Yes, the Microsoft sample dataset extension as explained in the product
documentation does this. If you want a custom applicaton to bind to the
dataset, you may find my dataset extension useful.
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B8468707-56EF-4864-AC51-D83FC3273FE5
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
<rhoeting@.hotmail.com> wrote in message
news:1098317642.985613.50720@.c13g2000cwb.googlegroups.com...
> I know there are ways to embed custom code into these reports, but the
> examples I've seen call the custom code outside the context of
> acquiring a resultset.
> Suppose I've created a class/assembly that has a shared method which
> returns a dataset. Is it possible to use this in my report to
> generate the record set rather than calling a stored prodedure or SQL
> from within the report?
> Rob
>|||Teo,
I will check into this. Actually, I've built some stronly typed
collections (using Rocky Lhotka's CSLA framework), which can be easily
converted to Datasets. Currently they are used to display results in
a bindable listview on a heavy client. My goal is to "reuse" these
classes as the engine for the reports (or simply the "print" version of
the listview). Can these reports bind to a strongly typed collection,
or does it need to be a dataset?
BTW, you book came in the mail today and it looks fantastic.
Thanks,
Rob|||Teo is off at a book signing and can't reply (okay, I lied!).
Reporting Services is extensible in the area of data providers. You would
have to write your own data provider though.
--
Regards,
Tim Ellison, MCP
Ironworks Consulting, LLC
(m) 804.405.4874
"rhoeting" <rhoeting@.hotmail.com> wrote in message
news:1098325731.315791.23320@.f14g2000cwb.googlegroups.com...
> Teo,
> I will check into this. Actually, I've built some stronly typed
> collections (using Rocky Lhotka's CSLA framework), which can be easily
> converted to Datasets. Currently they are used to display results in
> a bindable listview on a heavy client. My goal is to "reuse" these
> classes as the engine for the reports (or simply the "print" version of
> the listview). Can these reports bind to a strongly typed collection,
> or does it need to be a dataset?
> BTW, you book came in the mail today and it looks fantastic.
> Thanks,
> Rob
>|||I am back... woof, my hands hurt :-)
Your custom dataset extension can report off anything that can expose its
data in a tabular fashion.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"TIM ELLISON" <TimEllison@.direcway.com> wrote in message
news:OL%23cxv1tEHA.948@.tk2msftngp13.phx.gbl...
> Teo is off at a book signing and can't reply (okay, I lied!).
> Reporting Services is extensible in the area of data providers. You would
> have to write your own data provider though.
> --
> Regards,
> Tim Ellison, MCP
> Ironworks Consulting, LLC
> (m) 804.405.4874
> "rhoeting" <rhoeting@.hotmail.com> wrote in message
> news:1098325731.315791.23320@.f14g2000cwb.googlegroups.com...
> > Teo,
> >
> > I will check into this. Actually, I've built some stronly typed
> > collections (using Rocky Lhotka's CSLA framework), which can be easily
> > converted to Datasets. Currently they are used to display results in
> > a bindable listview on a heavy client. My goal is to "reuse" these
> > classes as the engine for the reports (or simply the "print" version of
> > the listview). Can these reports bind to a strongly typed collection,
> > or does it need to be a dataset?
> >
> > BTW, you book came in the mail today and it looks fantastic.
> > Thanks,
> >
> > Rob
> >
>|||I am new to Reporting Services but mayby someone can help me.
I am trying to get a pdf directly from a report with an external dataset. The external dataset works fine if I read it directly from an xml file in my compiled dataset extension. But when I try to do that whith a parameter wich contains xml , it isn't possible to create a dataset from my parameter(xml).
ERR=An attempt was made to set a report parameter 'xmlData' that is not defined in this report. But it is defined with my parameters and also one default in my report parameters
some code:
ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
byte[] ResultStream;
string[] StreamIdentifiers;
string OptionalParam = null;
ParameterValue[] optionalParams = null;
Warning[] optionalWarnings = null;
DataSet ds=new DataSet();
ds.ReadXml("C:\\RS\\C#\\test.xml");
string Param=ds.GetXml().ToString();
ParameterValue[] pv = new ParameterValue[1];
pv[0] = new ParameterValue();
pv[0].Name = "xmlData";
pv[0].Label = "xmlDataLabel";
pv[0].Value = Param;
ResultStream = rs.Render("/test/Custom", "PDF", null, "some xml",
pv,null, null, out OptionalParam, out OptionalParam, out optionalParams,
out optionalWarnings, out StreamIdentifiers);
Response.BinaryWrite(ResultStream);
this code requests a PDF from the report /test/Custom wich use an external dataset
I calls my external dataset but I cant find my parameters
some code external dataset
public Microsoft.ReportingServices.DataProcessing.IDataParameterCollection
Parameters
{
get { return _parameters; }
}
public class DSXParameter : IDataParameter
{
string _parameterName;
object _parameterValue;
// Default constructor
public DSXParameter()
{
}
// Constructor to accept parameter name & value.
public DSXParameter(string parameterName, object value)
{
_parameterName = parameterName;
_parameterValue = value;
}
public String ParameterName
{
get { return _parameterName; }
set { _parameterName = value; }
}
public object Value
{
get
{
return _parameterValue;
}
set
{
_parameterValue = value;
}
}
}
--
Doesn't reach this method ExecuteReader
--
public Microsoft.ReportingServices.DataProcessing.IDataReader ExecuteReader
(Microsoft.ReportingServices.DataProcessing.CommandBehavior behavior)
{
DSXExtensionDataReader testReader = new DSXExtensionDataReader(this.Parameters);
testReader.CreateDataSet();//_connection._xmlSchema
return testReader;
}
Hope you can help me
Thanks in advance
]]>
From http://www.developmentnow.com/g/115_2004_10_0_0_452155/Calling-External-Code-that-returns-a-Dataset.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Tuesday, March 20, 2012

calling custom assembly just wont work...

i am trying to call a custom assembly from a
report and it just wont work.
my code is as follows:
--
Public Class Module1
Public Shared Function Hello() As Integer
Return 2
End Function
End Class
--
i want to use this function to calculate one of my
dataset parameters. i have used this expression:
=FundTrackHelper.Module1.Hello()
this is the error i get:
Error 102 [rsCompilerErrorInExpression] The Value expression for the query
parameter â'@.organ_pkeyâ' contains an error: [BC30389]
'FundTrackHelper.Module1' is not accessible in this context because it is
'Private'.
c:\srcsafe\vs2005\reports\fundtrackreports\fundtrackreports\TEST.rdl 0 0
i have copied the assembly into: C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies
i also did try to modify the rssrvpolicy.config file to grant the assembly
code
permissions beyond the default execute permissions but this had no effect
so i took the modification out. furthermore, i dont think a simple piece
of code like this needs any extra permissions anyway.
any ideas appreciated.
thanks.
t.Hi,
did you had a reference of the assemblie in the report property..
can you define the method as static function and access it?
"taz" wrote:
> i am trying to call a custom assembly from a
> report and it just wont work.
> my code is as follows:
> --
> Public Class Module1
> Public Shared Function Hello() As Integer
> Return 2
> End Function
> End Class
> --
> i want to use this function to calculate one of my
> dataset parameters. i have used this expression:
> =FundTrackHelper.Module1.Hello()
> this is the error i get:
> Error 102 [rsCompilerErrorInExpression] The Value expression for the query
> parameter â'@.organ_pkeyâ' contains an error: [BC30389]
> 'FundTrackHelper.Module1' is not accessible in this context because it is
> 'Private'.
> c:\srcsafe\vs2005\reports\fundtrackreports\fundtrackreports\TEST.rdl 0 0
> i have copied the assembly into: C:\Program Files\Microsoft Visual Studio
> 8\Common7\IDE\PrivateAssemblies
> i also did try to modify the rssrvpolicy.config file to grant the assembly
> code
> permissions beyond the default execute permissions but this had no effect
> so i took the modification out. furthermore, i dont think a simple piece
> of code like this needs any extra permissions anyway.
> any ideas appreciated.
> thanks.
> t.|||c
hi,
yes i did add to references but i am not sure what
to put in the report properties | class name and
instance name bits - any help appreciated.
here is my code (the project is called FundTrackHelper):
Namespace xyz
Public Class Module1
Public Shared Function Hello() As Integer
Return 2
End Function
End Class
End Namespace
"Bava Mani" wrote:
> Hi,
> did you had a reference of the assemblie in the report property..
> can you define the method as static function and access it?
>
>
> "taz" wrote:
> > i am trying to call a custom assembly from a
> > report and it just wont work.
> >
> > my code is as follows:
> >
> > --
> >
> > Public Class Module1
> > Public Shared Function Hello() As Integer
> >
> > Return 2
> >
> > End Function
> >
> > End Class
> >
> > --
> >
> > i want to use this function to calculate one of my
> > dataset parameters. i have used this expression:
> > =FundTrackHelper.Module1.Hello()
> >
> > this is the error i get:
> >
> > Error 102 [rsCompilerErrorInExpression] The Value expression for the query
> > parameter â'@.organ_pkeyâ' contains an error: [BC30389]
> > 'FundTrackHelper.Module1' is not accessible in this context because it is
> > 'Private'.
> > c:\srcsafe\vs2005\reports\fundtrackreports\fundtrackreports\TEST.rdl 0 0
> >
> > i have copied the assembly into: C:\Program Files\Microsoft Visual Studio
> > 8\Common7\IDE\PrivateAssemblies
> >
> > i also did try to modify the rssrvpolicy.config file to grant the assembly
> > code
> > permissions beyond the default execute permissions but this had no effect
> > so i took the modification out. furthermore, i dont think a simple piece
> > of code like this needs any extra permissions anyway.
> >
> > any ideas appreciated.
> >
> > thanks.
> >
> > t.|||I think the problem might be that as far as I know you can only call
static methods in classes. Try making it static and see if this works|||tried to make the method static and it tells me:
Methods cannot be declared 'Static'
doesnt the 'Shared' keyword do the same thing? if so, as
u can see i am already using that...
"Thomo" wrote:
> I think the problem might be that as far as I know you can only call
> static methods in classes. Try making it static and see if this works
>|||sorry Taz, I didn't notice this earlier, from what I understand the
Shared statment is the equivalent of static in C#
you said that you compiled the assembly into C:\Program Files\Microsoft
Visual Studio
8\Common7\IDE\PrivateAssemblies, the assemblies that I call from my
report however are simply placed under the GAC.
Can you check to see if your assembly is under the
c:\Windows\Assemblies\ folder
Also the error seems to be complaining about the access level of the
Class <i>'FundTrackHelper.Module1' is not accessible in this context
because it is 'Private'. </i>
Not sure why it would be doing this if the class and member are
declared as 'Public' as you say above, maybe write a small test app
that can reference the same class / method and make sure this works.|||this morning i basically deleted my custom assembly and
created a new one from scratch with a namespace and it
now works. thanks for your help. i am sure i'll have loads
of other questions as well !!!!!
"Thomo" wrote:
> sorry Taz, I didn't notice this earlier, from what I understand the
> Shared statment is the equivalent of static in C#
> you said that you compiled the assembly into C:\Program Files\Microsoft
> Visual Studio
> 8\Common7\IDE\PrivateAssemblies, the assemblies that I call from my
> report however are simply placed under the GAC.
> Can you check to see if your assembly is under the
> c:\Windows\Assemblies\ folder
> Also the error seems to be complaining about the access level of the
> Class <i>'FundTrackHelper.Module1' is not accessible in this context
> because it is 'Private'. </i>
> Not sure why it would be doing this if the class and member are
> declared as 'Public' as you say above, maybe write a small test app
> that can reference the same class / method and make sure this works.
>

Calling Custom Assembly from Report Query MDX

I have a custom C# assembly with a static method that I want to call from the
report MDX. I have signed the assembly, copied it to the C:\Program
Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin
folder. I have also added the assembly to the GAC. In the AssemblyInfo.cs
file for the custom assembly I added "[assembly:
System.Security.AllowPartiallyTrustedCallers]" .
When I try running the report from Reporting Services I get the following
error: "An error has occurred during report processing.
Query execution failed for data set 'AIMDBA1_Cube'.
Query (7, 2) The
'[AdHocOLAPProcs].[AdHocOLAPProcs].[AdHoc].[FilteredDateSet]' function does
not exist."
I have included the report MDX below where
"AdHocOLAPProcs.AdHocOLAPProcs.AdHoc.FilteredDateSet" is the call to the
custom assembly .
================= SELECT NON EMPTY { [Measures].[Number of Queries Run] } ON COLUMNS, NON EMPTY
(
[ClientProjectDim].[Project ID].[Project ID].ALLMEMBERS *
[UserDim].[UserName].[UserName].ALLMEMBERS *
[QueryDim].[Status].[Status].ALLMEMBERS *
[DateDim].[YearStarted].[YearStarted].ALLMEMBERS *
AdHocOLAPProcs.AdHocOLAPProcs.AdHoc.FilteredDateSet (
[DateDim].[ShortDateStarted].ALLMEMBERS,
"[DateDim].[ShortDateStarted].&[2005-03-01T00:00:00]",
"[DateDim].[ShortDateStarted].&[2005-03-12T00:00:00]")
)
DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM
[Ad Hoc] CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE,
FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
=================
Any ideas where I am going wrong?
Thanks,
SteveI realize this doesn't help you Steve, but I'm having the exact same
problem.

Monday, March 19, 2012

Calling an .EXE from a SQL Job?

I'm trying to call a .exe as a Job Step that pulls some data and sends out
custom emails that will execute after a DTS package runs. I tested the EXE
from the command line and it works but I don't know how to call it from with
the Job Step.
I have the step called ''Example of calling an EXE" and set an Operating
System Command (CmdExec) with:
xp_cmdshell 'C:\MyApp\SendAlert.exe' , no_output
When it runs, I check the Windows event and it says:
SQL Server Scheduled Job 'Example of calling an EXE'
(0x0AE46A0A26688D48B29A3C71684CB284) - Status: Failed - Invoked on:
2005-10-27 13:04:45 - Message: The job failed. The Job was invoked by User
sa. The last step to run was step 1 (Calling the EXE).
I have no idea why it's failing when called as a job?One other thing I found while executing the following in query analyzer:
xp_cmdshell 'C:\MyApp\SendAlert.exe'
returns:
"The system cannot find the path specified"
Thanks again.
"Dave" wrote:
> I'm trying to call a .exe as a Job Step that pulls some data and sends out
> custom emails that will execute after a DTS package runs. I tested the EXE
> from the command line and it works but I don't know how to call it from with
> the Job Step.
> I have the step called ''Example of calling an EXE" and set an Operating
> System Command (CmdExec) with:
> xp_cmdshell 'C:\MyApp\SendAlert.exe' , no_output
> When it runs, I check the Windows event and it says:
> SQL Server Scheduled Job 'Example of calling an EXE'
> (0x0AE46A0A26688D48B29A3C71684CB284) - Status: Failed - Invoked on:
> 2005-10-27 13:04:45 - Message: The job failed. The Job was invoked by User
> sa. The last step to run was step 1 (Calling the EXE).
> I have no idea why it's failing when called as a job?|||Dave wrote:
> I'm trying to call a .exe as a Job Step that pulls some data and
> sends out custom emails that will execute after a DTS package runs.
> I tested the EXE from the command line and it works but I don't know
> how to call it from with the Job Step.
> I have the step called ''Example of calling an EXE" and set an
> Operating System Command (CmdExec) with:
> xp_cmdshell 'C:\MyApp\SendAlert.exe' , no_output
> When it runs, I check the Windows event and it says:
> SQL Server Scheduled Job 'Example of calling an EXE'
> (0x0AE46A0A26688D48B29A3C71684CB284) - Status: Failed - Invoked on:
> 2005-10-27 13:04:45 - Message: The job failed. The Job was invoked
> by User sa. The last step to run was step 1 (Calling the EXE).
> I have no idea why it's failing when called as a job?
xp_cmdshell is in the master database. You need to fully qualify the
name if you are not in master:
exec master..xp_cmdshell 'dir'
Also, you need to make sure the SQL Server service account has access to
the folder where you placed the EXE. If not, you need to grant the
account access of move the file(s) to a folder where the account has
access.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Dave
You can also run cmd commands from SQL jobs In the same job you are running
DTS
--
Paul Zanbaka
DBA, Programmer Analyst
"David Gugick" wrote:
> Dave wrote:
> > I'm trying to call a .exe as a Job Step that pulls some data and
> > sends out custom emails that will execute after a DTS package runs.
> > I tested the EXE from the command line and it works but I don't know
> > how to call it from with the Job Step.
> >
> > I have the step called ''Example of calling an EXE" and set an
> > Operating System Command (CmdExec) with:
> >
> > xp_cmdshell 'C:\MyApp\SendAlert.exe' , no_output
> >
> > When it runs, I check the Windows event and it says:
> >
> > SQL Server Scheduled Job 'Example of calling an EXE'
> > (0x0AE46A0A26688D48B29A3C71684CB284) - Status: Failed - Invoked on:
> > 2005-10-27 13:04:45 - Message: The job failed. The Job was invoked
> > by User sa. The last step to run was step 1 (Calling the EXE).
> >
> > I have no idea why it's failing when called as a job?
> xp_cmdshell is in the master database. You need to fully qualify the
> name if you are not in master:
> exec master..xp_cmdshell 'dir'
> Also, you need to make sure the SQL Server service account has access to
> the folder where you placed the EXE. If not, you need to grant the
> account access of move the file(s) to a folder where the account has
> access.
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>

Calling a web service from Custom Code Block

Is it possible to make a web service call from a report's custom code
section? Or is it neccesary to wrtie a custom assembly to do it?
Thanks.It will be necessary to write a custom assembly to do it - unless you
unsecure the permissions of the Report Expressions - which is not a good
idea.
You'll need to learn about Code Access Security to do this properly and our
book's Chapter 9 will give you a great deal of information to get you up and
running with writing Custom Assemblies and Securing them for use in
Reporting Services.
Peter Blackburn
Hitchhiker's Guide to SQL Server 2000 Reporting Services
http://www.sqlreportingservices.net
"billd" <billd@.discussions.microsoft.com> wrote in message
news:C7AC6A11-97BC-4648-9130-8A6AA196C488@.microsoft.com...
> Is it possible to make a web service call from a report's custom code
> section? Or is it neccesary to wrtie a custom assembly to do it?
> Thanks.|||Peter,
Doing something similar to Chapter 9 - but getting stuck on what I need to
put into the policy file - I have read Yogesh's link - but still having
problems.
Any help appreciated.
"Peter Blackburn (www.sqlreportingservice" wrote:
> It will be necessary to write a custom assembly to do it - unless you
> unsecure the permissions of the Report Expressions - which is not a good
> idea.
> You'll need to learn about Code Access Security to do this properly and our
> book's Chapter 9 will give you a great deal of information to get you up and
> running with writing Custom Assemblies and Securing them for use in
> Reporting Services.
> Peter Blackburn
> Hitchhiker's Guide to SQL Server 2000 Reporting Services
> http://www.sqlreportingservices.net
>
> "billd" <billd@.discussions.microsoft.com> wrote in message
> news:C7AC6A11-97BC-4648-9130-8A6AA196C488@.microsoft.com...
> > Is it possible to make a web service call from a report's custom code
> > section? Or is it neccesary to wrtie a custom assembly to do it?
> >
> > Thanks.
>
>

Sunday, March 11, 2012

Calling a custom web service from my package to perform heavy-duty tasks

As part of my SSIS package, a list of sites is created that need to be created on a remote machine. let's say 1000 sites. I need to pass this list to a web service so web service sitting on that machine creates these sites for me. MY SSIS package does not run frequently so I can sacrifice time a little bit to get better functionality.

I need to move the sites that are not created (for any reasons) by web service to another table and successfully created sites to another table, so I need to get confirmation for each site from the web service.

Which option is better?

1) Calling web service for every single record (site) and get the confirmation and then based on the confirmation I move the records accordingly. I know this might be very time consuming, but as I said my SSIS package might only run every six months

OR

2) Sending records to a web service in a batch and get the result. I don’t know how to do this though.

Any help or better solution is appreciated.

If the web service is already created, you might be stuck with whatever it supports. Often, web services have either a single record interface or a batch interface, but not both. If you have control over how it is implemented, then either option will work.

If the web sevice is capable of handling a batch, you just need to make sure your message conforms to what the web service expects. That could be by concatenating a large string together.

|||

Web Service is not implemented yet.Actually I have to implement the web service.Any clues on how to implement batch web services?

Thanks

|||

The message that the web service accepts needs to contain multiple items, and handle processing them in a batch.

For example, your message payload might contain:

<Websites>
<Website>A</Website>
<Website>B</Website>
<Website>C</Website>
</Websites>

Wednesday, March 7, 2012

call custom SQL function in ASP.NET

I made an SQL function in MSSQL2000. This is a function that get's a calculated heat emission. When I run the Query in MSSQL2000 the function works. It calculates every emission for every row. When I call this SQL function in VS2005, it says it does not recognize the function. Does anyone know what this may cause? thank you. For the people who are bored, I added the SQL statement. The error is at the function

SELECT TOP 15 tbProducts.prod_code, tbProductProperties.prop_height, tbProductProperties.prop_length, tbProductProperties.prop_type, tbProductProperties.prop_default_emission, tbProductProperties.prop_weight, tbProductProperties.prop_water_volume, tbProductProperties.prop_n_value, GetHeatEmission(50,70,20,[prop_default_emission],[prop_n_value]) AS customEmission FROM tbProductClassification INNER JOIN tbProducts ON tbProductClassification.clprod_fk_prod_id = tbProducts.prod_id INNER JOIN tbProductProperties ON tbProducts.prod_id = tbProductProperties.prop_fk_prod_id WHERE (tbProductClassification.clprod_fk_class_id = 3327) AND (prop_height >= '030') AND (prop_height = '060') AND (prop_lengthYou may try to use the full name of that function, like dbo.GetHeatEmission().