Results 1 to 4 of 4

Thread: Equivalent of ADODC.recordset.field("<name>") in Visual studio 2005

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    70

    Equivalent of ADODC.recordset.field("<name>") in Visual studio 2005

    Hi all
    I am a newbie.. so please be patient with me

    i have been using vb6 all along
    very recenty i am working myself on Visual Studio 2005

    once i establised the conection to my MSAccess database (Trial.mdb) and refrence to the table (birthday_table)

    i am able to conect my textboxes to thetable and retrive recods in the table
    I ma using bindingnavigatpr to move throght the records and the text boxes are getting refreshed accordngly


    in VB6 i usually use msgbox Adodc1.recordset.feilds("Name") to retrive the value of current row

    how do i acheve this in VISUAL STUDIO 2005??

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,433

    Re: Equivalent of ADODC.recordset.field("<name>") in Visual studio 2005

    Assuming you are using ADO.NET then it's myDataTable.Rows(rowIndex)("Name"). You should do some reading on ADO.NET. There are numerous tutotrials in my signature that can give you the low-down.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    70

    Re: Equivalent of ADODC.recordset.field("<name>") in Visual studio 2005

    hi jmcil

    I have dloaded and installed VISUAL STUDIO EXPRES 2005 with MSDN.. (i have not installed VC#,VC++,VJ++,sql)
    so can i say i am using VB.net

    when i establis conection i have thE following controls on my form
    BINDINGSOURCE1
    TRIALDATASET
    BORTHDAYTABLEADAPTER
    BIRTHDABINDINGSOURCE

    I WANT TO display the "name" as messagebox each time a button is clciked
    in VB6 i would be using. msgbox ADOC1.recordset.field("name")

    what would i be using now..?...

    thnks for the link about e books.. will see to them soon

  4. #4
    Lively Member
    Join Date
    Mar 2006
    Posts
    88

    Re: Equivalent of ADODC.recordset.field("<name>") in Visual studio 2005

    Quote Originally Posted by Deepa7476
    hi jmcil
    what would i be using now..?...

    thnks for the link about e books.. will see to them soon
    Your question was answered already, really!
    But here it is again:

    VB Code:
    1. Messagebox.show(myDataTable.Rows(rowIndex)("Name"))

    Alternatively:

    VB Code:
    1. Dim tbl as Datatable
    2. Messagebox.show(tbl.Rows(i).Item("Word").ToString)
    Last edited by SammyWaslow; May 1st, 2006 at 07:49 AM.
    Using Visual Studio 2005 / Framework 2.0

Posting Permissions

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



Click Here to Expand Forum to Full Width