Solved

Populating a text field

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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