VB.NET: How to retrieve a field value from a data source binding?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: VB.NET: How to retrieve a field value from a data source binding?

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    VB.NET: How to retrieve a field value from a data source binding?

    Hi everyone!

    I'm a VB.NET newbie, and i'm currently building a .NET application.

    in VB6 (Data1 = Data control):
    MsgBox "ClientName is: " & Data1.Recordset("LastName")

    in Delphi:
    MessageDlg('ClientName is: ' + qryClientsClientName.AsString, mtInformation, [mbOK], 0);

    How do i achieve the same in VB.NET (VS2010) in data binding mode?


    Thanks in advance!

  2. #2
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008
    Location
    WV
    Posts
    4,850

    Re: VB.NET: How to retrieve a field value from a data source binding?

    look up dataset and datareader objects
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Sep 2011
    Posts
    2

    Re: VB.NET: How to retrieve a field value from a data source binding?

    i finally got it to work, and i'd like to share it with you guys.



    Dim myRowView As DataRowView = ClientsBindingSource.Current

    MessageBox.Show(myRowView.Item("ClientName"))

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center