Results 1 to 7 of 7

Thread: sqladapter

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    sqladapter

    Hi gurus
    I have a select statement, this select statement comes back on a slqadapter, would l would like to do is like

    textbox1.text=sqladapter.(columane1)
    textbox2.text=sqladapter.(columane2)

    and so forth instead of filling a datagrid.

    can you point me to the right direction

    Thanks a bunch

  2. #2
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Re: sqladapter

    Im no Expert on Databases But a DataReader should be more suited to your needs depending on your table layout. Or you can use your sqladapter and fill a datatable and loop through that filling the textboxes

  3. #3
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: sqladapter

    What's the point? If it's something like the BindingNavigator it only exists after the .net framework 2?
    CodeProject Sample

    Rate People That Helped You
    Mark Thread Resolved When Resolved

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: sqladapter

    Do you mean a SQLDataAdapter, or is this something different? Are you trying to bind data to the textboxes, or just populate them?
    My usual boring signature: Nothing

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    Re: sqladapter

    sorry gurus

    I meant to say sqldataadapter, yes I would like use aside from filling a datagrid, how do I go and pull the result on sqldataadapter and fill multiple textboxes.

    Thanks a bunch gurus

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: sqladapter

    The dataadapter fills a datatable. You would then use the datatable to fill the textboxes. The reason for having the datatable is so that you have a copy of the information from the database in memory. The datatable doesn't even have to match the structure of the underlying database. If those reasons don't apply, then you probably don't need a datatable, in which case you probably don't want to use a dataadapter at all.

    A datareader would be better if you only wanted to show one row, or only wanted to go forward through a set of rows. Otherwise, if you want to go forwards and back through the rows, or want to make changes to the data, you would probably be better off using a dataadapter, but filling a datatable explicitly, then using that datatable for populating the textboxes. I used the term 'explicitly' because your original post suggests that you have used dataadapters to fill datatables bound to datagridviews without really recognizing the existence of the datatable.
    My usual boring signature: Nothing

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2001
    Posts
    138

    Re: sqladapter

    Thanks a bunch S. I will look into the datable.
    Thanks again

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