[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Webservices and strongly typed datasets

Shawn Jackson

7/9/2003 3:38:00 PM

Dear group,

I have a webservice which I use as a datalayer. Basically its function
is to fill a strongly typed dataset with data and return it to my
webapplication that called it.

My webservice has the following method:

<WebMethod()> Public Function FillCatalog(ByVal ds As catalogds) As
catalogds
Dim myConnection As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim myDataAdapter As SqlDataAdapter = New
SqlDataAdapter("procCatalogGetList", myConnection)

myDataAdapter.SelectCommand.CommandType =
CommandType.StoredProcedure

myConnection.Open()

myDataAdapter.TableMappings.Add("Table", "products")
myDataAdapter.TableMappings.Add("Table1", "productprice")
'sda.TableMappings.Add("Table2", "productspecial")

myDataAdapter.Fill(ds)
myConnection.Close()

Return ds
End Function


Now if I create a aspx file in that project to call this using the below
code:

Dim catalogds As catalogds

Dim dp As vna = New vna
catalogds = New catalogds
dp.FillCatalog(catalogds)

Dim pr As catalogds.productsRow =
catalogds.products.FindByproduct_id(productid)
Dim ppr As catalogds.productpriceRow() = pr.GetproductpriceRows


This code works fine locally. But if I try to run this code on my
webapplication that has consumed the webservice, it seems that the
dataset comes back empty. The code I use on my webapplication (assuming
the reference to the webservice is 'vna') is as follows:


Dim catalogds As vna.catalogds

Dim dp As vna.vna = New vna.vna
catalogds = New vna.catalogds
dp.FillCatalog(catalogds)

Dim pr As vna.catalogds.productsRow =
catalogds.products.FindByproduct_id(productid)

Dim ppr As vna.catalogds.productpriceRow() = pr.GetproductpriceRows

The error occurs in the last line of code. It is acting as if there is
no data in the dataset. Has anyone any similar experience with this?
Please let me know.

Thanks

*** Sent via Developersdex http://www.develop... ***
Don't just participate in USENET...get rewarded for it!
1 Answer

Orval Fairbairn

7/25/2011 3:26:00 AM

0

In article <4e2c8e86$0$2168$742ec2ed@news.sonic.net>,
rfischer@sonic.net (Ray Fischer) wrote:

> Orval Fairbairn <orfairbairn@earthlink.net> wrote:
> >In article <4e2c727c$0$2194$742ec2ed@news.sonic.net>,
> > rfischer@sonic.net (Ray Fischer) wrote:
> >
> >> Orval Fairbairn <orfairbairn@earthlink.net> wrote:
> >> > rfischer@sonic.net (Ray Fischer) wrote:
> >> >> Orval Fairbairn <orfairbairn@earthlink.net> wrote:
> >> >> > rfischer@sonic.net (Ray Fischer) wrote:
> >> >> >> Orval Fairbairn <orfairbairn@earthlink.net> wrote:
> >> >> >> > rfischer@sonic.net (Ray Fischer) wrote:
> >> >> >>
> >> >> >> >> Fascists hate liberals.
> >> >> >> >
> >> >> >> >True ... but "Progressives" are just another flavor of fascist.
> >> >> >>
> >> >> >> Jefferson, Franklin, Paine, Revere - all "fascists" according to the
> >> >> >> right wing extremist.
> >> >> >
> >> >> >No -- they were true liberals.
> >> >>
> >> >> Progressive: (of a group, person, or idea) favoring or implementing
> >> >> social reform or new, liberal ideas
> >> >> New Oxford American Dictionary
> >> >
> >> >... as defined by "Progressives."
> >>
> >> And now the rightard kook insists that the whole world is conspiring
> >> against him and his fellow lunatics.
> >>
> >> It is the insanity of hate.
> >
> >Once again, Ray Ray reinforces my contention that there is no such
> >animal as an "honest progressive."
>
> And there's more of that fascist hatred of liberalism.

Well, Ray-Ray, Everybody KNOWS that you are not an "honest Progressive"!
You have proven that by your nasty habit of snipping others' posts
before replying to them. I do not hate true liberalism, but I DO hate
statism! That includes communism, socialism, fascism, militarism,
feudalism, religionism and any other flavor of tyranny.