|
-
Feb 28th, 2011, 04:36 PM
#1
Thread Starter
Addicted Member
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
-
Feb 28th, 2011, 04:41 PM
#2
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
-
Feb 28th, 2011, 05:39 PM
#3
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
-
Feb 28th, 2011, 06:36 PM
#4
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
 
-
Mar 1st, 2011, 11:41 AM
#5
Thread Starter
Addicted Member
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
-
Mar 1st, 2011, 12:02 PM
#6
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
 
-
Mar 1st, 2011, 12:56 PM
#7
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|