I'm fairly new to C#, especially with databases. I've worked in VBA and Delphi doing databases, so I was hoping to just use this like a RecordSet or a Tcursor, but so far it's not panning out like that.
I have a SQL database added as a dataset in my project (Windows forms). For a given table ("HTC") I have a TableAdapter set up, and it includes 2 custom queries. One gets the active record and the other gets the cancelled records. Both of these queries have a parameter so they only pull for a single account ("GPN"). Right now I have the TableAdapter filling like this:
this.htcActiveTableAdapter.ActiveFillBy(cramdDataSet.htc, gpn); this.htcCancelledTableAdapter.CancelledFillBy(cramdDataSet.htc, gpn);
After that, I'm not sure where to go. I need to get it to a state where I can count the number of records returned as well as display some of the data in textboxes on the form. Eventually, the plan is to allow editing the data and sending it back to the database, but for now I'm trying to just get the displaying part done. I've tried following along with various tutorials I've found online, but I have been unable to figure out how to alter their code so it works with my setup. They also usually deal with bound controls, which I don't have. Maybe binding the controls is the way to go, but I don't know what that would look like either.
Sorry if this sounds like a "gimme code" request. It's really not; I'm just looking for a push in the right direction. I'm also all for just being given a link that you think explains how I need to do this (I've read so many over the last week or so I've been working on this, so don't be surprised if I've already read the one you attach :))