Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:22:07+00:00 2026-06-16T00:22:07+00:00

Im making a silverlight 5 application and im using RIA WCS services to connect

  • 0

Im making a silverlight 5 application and im using RIA WCS services to connect to sql, i can add data,delete data, edit data, and get all data, but the problem is that i need to retrieve a specific record not the whole entity, when i try the following code just nothing happens:

Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
‘ InitializeComponent()
objctx = New BanksDomainContext
Dim itemType = Branch_NameComboBox.SelectedItem.GetType
Dim pi = itemType.GetProperty(Branch_NameComboBox.DisplayMemberPath)
Dim cbi = pi.GetValue(Branch_NameComboBox.SelectedItem, Nothing).ToString()
Dim BranchName As String = cbi

    '   Dim query As EntityQuery(Of Branches) = objctx.GetBranchesDetailsQuery(BranchName)

    '  Dim loadOp As LoadOperation(Of Branches) = Me.objctx.Load(query)
    '  DataGrid1.ItemsSource = loadOp.Entities
    '  objctx.Load(query, LoadData, Nothing)

    Dim loadOp = Me.objctx.Load(Me.objctx.GetBranchesDetailsQuery(BranchName))


    LoadData(loadOp)


End Sub
Private Sub LoadData(lo As LoadOperation)

    For Each br As Branches In lo.Entities

        AddressTextBlock.Text = br.Address
        CoordinatesTextBlock.Text = br.Coordinates
        ManagerTextBlock.Text = br.Manager
        PhoneTextBlock.Text = br.Phone
        FaxTextBlock.Text = br.Fax        
Next

End Sub

can someone guide me on how to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:22:08+00:00Added an answer on June 16, 2026 at 12:22 am

    The following is the solution to load text boxes from SQL records by selecting the search term from a list box:

    Private Sub Branch_NameComboBox_SelectionChanged(sender As System.Object, e As System.Windows.Controls.SelectionChangedEventArgs) Handles Branch_NameComboBox.SelectionChanged
        m_PushpinLayer.Children.Clear()
        objctx = New BanksDomain
        Dim itemType = Branch_NameComboBox.SelectedItem.[GetType]()
        Dim pi = itemType.GetProperty(Branch_NameComboBox.DisplayMemberPath)
        Dim cbi = pi.GetValue(Branch_NameComboBox.SelectedItem, Nothing).ToString()
        Dim BranchName As String = cbi
        Dim itemType2 = NameComboBox.SelectedItem.[GetType]()
        Dim pi2 = itemType2.GetProperty(NameComboBox.DisplayMemberPath)
        Dim cbi2 = pi2.GetValue(NameComboBox.SelectedItem, Nothing).ToString()
        Dim BankName As String = cbi2
        Dim bb As EntityQuery(Of Branches) = From b In objctx.GetBranchesDetailsQuery(BranchName) Where b.Bank = BankName Select b
    
    
    
        Dim res As LoadOperation(Of Branches) = objctx.Load(bb, New Action(Of LoadOperation(Of Branches))(AddressOf GetBeansCompleted), True)
    
    End Sub
    Private Sub GetBeansCompleted(args As LoadOperation(Of Branches))
    
    
        For Each bc As Branches In args.Entities
            ' 
            Dim Latitude As Double = bc.Lat
            Dim Longitude As Double = bc.Lon
    
            Dim CoO As Location = New Location
    
            CoO.Latitude = Decimal.Parse(Latitude)
            CoO.Longitude = Decimal.Parse(Longitude)
    
            Dim BName As String = bc.Branch_Name.ToString
            Dim MKColor As Color = GetThisColor(bc.MapKeyColor.ToString)
    
    
    
    
            AddPushPin(BName, CoO, MKColor)
    
            AddressTextBlock.Text = (bc.Address.ToString)
            LatTextBlock.Text = (Decimal.Parse(Latitude))
            LonTextBlock.Text = (Convert.ToDecimal(Longitude))
            ManagerTextBlock.Text = (bc.Manager.ToString)
            PhoneTextBlock.Text = (bc.Phone.ToString)
            FaxTextBlock.Text = (bc.Fax.ToString)
    
    
    
        Next
    
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a RIA application using Silverlight and web services. The method of
I am making an application in Silverlight 3.0. In that application i am using
I'm making a simple game using the Windows Phone Silverlight and XNA Application type
I am making an application using Silverlight. I must restict the access of some
I am making a WP7 Silverlight application and using a ViewModel to store the
i am making an application in silver light.In that application i am using data
We are trying to deploy a Silverlight + WCF RIA Services application to an
I am making an web application using silverlight 3.0 . In that application i
I am making a Progressbar as part of my Silverlight application that is triggered
I am making an application in silverlight 3.0 In that application i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.