Solved

Populating a text field

Posted on 2006-07-17
1
242 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now