Skip to main content

Microsoft Silverlight

Answered Question Silverlight Database Problems?!RSS Feed

(0)

TheEagle
TheEagle

Member

Member

4 points

11 Posts

Silverlight Database Problems?!

Hi,

After reading some books I understand that we can not get data from a database without using a webservice right?

But Im facing a problem with asynchronous methods:How could I detect that the method is completed?

If using Async methods isn't the only choice how could I use Sync methods so it is finished before any thing else.

It seems to me that Async methods looks useless with database because most of times we need data to be read from database before making any other operations right?

Please answer my questions to help me to solve my problems.Im realy confused Confused

Ardman
Ardman

Contributor

Contributor

3308 points

918 Posts

Answered Question

Re: Silverlight Database Problems?!

When you call an async member, you can set up a Completed Event Handler to process the result set.

TheEagle
TheEagle

Member

Member

4 points

11 Posts

Re: Re: Silverlight Database Problems?!

I used that method already but I want to detect that the method is completed from outside that handler (in another method).I mean is there a way to detect it from the Proxy instance for example?

TheEagle
TheEagle

Member

Member

4 points

11 Posts

Re: Re: Silverlight Database Problems?!

OK..I put a boolean variable in the handler to detect if it is completed from another method and it works fine.

I thought there should be a property of the proxy instance to detect if the method is completed or yet.

Is there any way to use Sync methods instead of Async?So I don't need checking completed or not and such things which I expect to effect the performace.

Ardman
Ardman

Contributor

Contributor

3308 points

918 Posts

Answered Question

Re: Re: Re: Silverlight Database Problems?!

 Silverlight doesn't support synchronous methods.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities