Data Adapter User

Ldragon99

Member
Joined
Oct 13, 2007
Messages
10
Programming Experience
1-3
I know my questions are very basic, I am just trying to get my head around the database stuff. My question is this. Can I use the Data adapter in sql 2005 express to update, insert and delete info from my database without using a data grid in my application? Can I display the info from a database table in text boxes and combo boxes. Make my changes there then update the info back to the database with the data adapter Update function? I am not 100 percent sure on how to do it or even where to get more info on it. I have seen lots of detailed explanations, but they all use the data grid
 
Data access and data-binding are two completely separate operations.

You retrieve data from the database into a DataTable using a DataAdapter. That's data access. You save the changes in a DataTable back to the database using a DataAdapter. That's data access. What happend to the DataTable in between has nothing to do with data access. The DataTable could be passed around the world 100 times and it wouldn't matter. The data access mechanism has no interest.

You bind a DataTable to a grid and the user makes changes. That's data-binding. You bind the data to TextBoxes and ComboBoxes. That's data-binding. Where the DataTable came from and where it goes afterwards is of no concern to the data-binding mechaism.

Imagine this. You have a black box called Data Access and another called Data Binding. They each have some pipes coming out of them for input and output. You attach the pipes together to allow data to flow between them. That's a useful and very common situation. It doesn't mean that those black boxes won't work without each other though. You could attach the Data Binding box to a different box called Web Service and it would still work. You could attach the Data Access box to another box called Crystal Report. They will all still work because each is a unit that has its own job to do. It simply works with inputs and outputs with no care for where they come from or where they go; only that they are of the appropriate type.
 
I know my questions are very basic, I am just trying to get my head around the database stuff. My question is this. Can I use the Data adapter in sql 2005 express to update, insert and delete info from my database without using a data grid in my application? Can I display the info from a database table in text boxes and combo boxes. Make my changes there then update the info back to the database with the data adapter Update function? I am not 100 percent sure on how to do it or even where to get more info on it. I have seen lots of detailed explanations, but they all use the data grid

You are using .NET 2.0
You shouldnt be using DataGrid at all
You shouldnt be using DataAdapter unless you are using a MySQL database

Take a read of theDW2 link in my sig, starting with the "Creating a SImple Data App" page. I really wish I'd have that link when i started doing data acess in .net
 
Back
Top