retreived record

Posted on 2006-05-15
Last Modified: 2010-04-23
How can I retreive a record from txtMytransno.txt and load it into these textboxes?  - Transactionnumber, Address, City, State, Zip and Repcomment. Below just fill Datagridview.

Dim StrConnection As String = "provider=microsoft.jet.oledb.4.0;" + "data source = C:\Documents and Settings\CLIENT.SST_DOM\Desktop\XMAN\bad.mdb"

Dim Connection As New OleDbConnection(StrConnection)

Dim myCommand As New OleDbCommand("SELECT * FROM badtable where Transactionnumber = ' " & me.txtMytransno.txt & " ' ", Connection)

da.SelectCommand = myCommand

da.TableMappings.Add("Table", "badtable")



DataGridView1.DataSource = ds.Tables("badtable")            ------   This is load on datagridview only

Catch ex As OperationAbortedException


End Try
Question by:VBdotnet2005
    LVL 5

    Expert Comment

    you need to bind the textboxes to the datagridview if i am understanding your question correctly
    LVL 5

    Expert Comment

    bind to ds..sorry...

    Author Comment

    Infact I don't need datagridview at all. You can replace the code. I just want to retreive a record and fill textboxes -  txtTransactionnumber.txt, txtAddress.txt , txtCity.txt, txtState,txt ,txtZip.txt  and txtRepcomment.txt.
    LVL 5

    Accepted Solution

    that should be all the info you need.  gl

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    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 ( Literal, only instead of starting and ending with w…
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    759 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

    12 Experts available now in Live!

    Get 1:1 Help Now