Solved

Populating a text field

Posted on 2006-07-17
1
265 Views
Last Modified: 2010-04-23
Here where I fill my dataset  which consists of two field     Img and pathway

Private Sub Pathway_Fill()
        Dim ds As DataSet

        ds = New DataSet("tblPathway")
        SqlDataAdapter_getPathway.SelectCommand.Parameters("@ABR_ID").Value = Me.txtABR_ID.Text
        SqlDataAdapter_getPathway.Fill(ds, "tblPathway")


    End Sub

I call it when the form loads


The field I need to populate is txbPathway and it needs to populate with the "pathway" field from the ds.

I'm missing the code that will do that last portion.

Thanks.
0
Comment
Question by:TimSweet220
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
sagacitysolutions earned 500 total points
ID: 17126237
Try This

Private Sub Pathway_Fill()
        Dim ds As DataSet

        ds = New DataSet("tblPathway")
        SqlDataAdapter_getPathway.SelectCommand.Parameters("@ABR_ID").Value = Me.txtABR_ID.Text
        SqlDataAdapter_getPathway.Fill(ds, "tblPathway")

        If ds.Tables.Count > 0 Then
           If ds.Tables.Rows.Count > 0 Then
               txbPathway.Text = ds.Tables("tblPathway").Rows(0).Cells("Pathway")
           End If
        End If

    End Sub
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question