Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have data service which has function which executes stored procedure(with no parameters intake and its not associated with any table when i do function import) but return type is string.

I am able to see content of data when i access the function :
http://localhost:Portnum/Webdataservice.svc/GetData

Now problem i am facing is as below:
I have to store the contents of returned result into string variable.I tried with many things but all in vain. So please do suggest if you know.


Please Guide with the same ,I have tried with WCF services and Webservices(asmx). But thing is when i deploy it .Internet users face problem .but intranet users can view it perfectly.

Thanks,
Madhav Joshi
Posted
Updated 28-Jul-11 20:31pm
v4

Ok, no code to help, but what you need to basically do is this:

C#
string myString = string.Empty;
MyService.MyMethodAsync(); //It should append async to the method name
MyMethodCompleted += new Eventhandler<mymethodcompletedeventargs>(MyEventHandler);

void MyEventHandler(object sender, MyMethodCompletedEventArgs e)
{
     myString = e.Result;
}
</mymethodcompletedeventargs>
 
Share this answer
 
Comments
[no name] 28-Jul-11 2:01am    
Thanks for that . But its solution for WCF services. Sorry i dint mention in question that i want for ADO.net data services.
Pls let me know if u have solution for that
DominicZA 28-Jul-11 2:17am    
Did you try it? It should be the same for all services?
[no name] 28-Jul-11 2:59am    
We cant access ado.net services the same way how we acess WCF services thats the problem otherwise i have implmented WCF and have done same :)
Atlast Did it without help of any services (WCF,ado.net data services,web services )
Used webclient Asynchoronous method to get XML generated at specified url as string and made it work on Internet :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900