Click here to Skip to main content
15,896,118 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: prime number Pin
tonym00115-May-09 10:53
tonym00115-May-09 10:53 
GeneralRe: prime number [modified] Pin
Luc Pattyn15-May-09 10:55
sitebuilderLuc Pattyn15-May-09 10:55 
GeneralRe: prime number Pin
tonym00115-May-09 11:01
tonym00115-May-09 11:01 
GeneralRe: prime number Pin
Luc Pattyn15-May-09 11:21
sitebuilderLuc Pattyn15-May-09 11:21 
GeneralRe: prime number Pin
Henry Minute15-May-09 11:55
Henry Minute15-May-09 11:55 
AnswerRe: prime number Pin
0x3c014-May-09 19:59
0x3c014-May-09 19:59 
QuestionDataset Question... Pin
smjunior0914-May-09 13:47
smjunior0914-May-09 13:47 
AnswerRe: Dataset Question... Pin
Johan Hakkesteegt17-May-09 20:35
Johan Hakkesteegt17-May-09 20:35 
Okay, this is just too horrible to even want to try and steer in the right direction.

So let's take one BIG step back:

The DataSet is (in a sense) an interface between your logic (code), your data(base) and your GUI. It is NOT a filter.

The basic sequence of events is thus:
1. A query gets the required data from the database. This should already filter as much as possible.
2. The returned result is stored in a (single) dataset.
3. You connect the dataset to your GUI. For example a dataview, or a form with text boxes, or something like that.
4. You write code for any necessary filters, you want the user to be able to apply, such that it is only filtered in the GUI.
5. The user edits and/or inserts and/or deletes data in the GUI. These changes are stored in the DataSet
6. When the user is done, you simply call MyDataSet.Update() and Bob's your uncle.

If you are absolutely sure that there really is no other way than using several datasets on a single database table (which really is a very bad idea), you are going to have to look into row states.
Basically, whenever the user makes a change to a row, the dataset changes the rowstate of that row. In other words, when the user deletes a row, the dataset does not actually delete that row, it just sets the RowState of the row to "deleted".

Another approach would be to update a single dataset, then requery the database and compare the next dataset's changes to that, change any rowstates, update that dataset, etc. However this method (i.e. the path you are on right now) will lead you into to deepest and darkest recesses of a logic jungle, that I fear we will not see you return from.

My advice is free, and you may get what you paid for.

QuestionEasy Datetime question... Pin
smjunior0914-May-09 9:28
smjunior0914-May-09 9:28 
AnswerDateTime Pin
Luc Pattyn14-May-09 9:45
sitebuilderLuc Pattyn14-May-09 9:45 
AnswerRe: Easy Datetime question... Pin
nlarson1114-May-09 11:17
nlarson1114-May-09 11:17 
QuestionEdit an existed record Pin
Manoucheka2714-May-09 9:11
Manoucheka2714-May-09 9:11 
AnswerRe: Edit an existed record Pin
Dave Kreskowiak14-May-09 9:46
mveDave Kreskowiak14-May-09 9:46 
GeneralRe: Edit an existed record Pin
Manoucheka2715-May-09 8:02
Manoucheka2715-May-09 8:02 
QuestioniTextSharp set and flatten layers Pin
bkwooten14-May-09 8:08
bkwooten14-May-09 8:08 
AnswerRe: iTextSharp set and flatten layers Pin
Dave Kreskowiak14-May-09 9:43
mveDave Kreskowiak14-May-09 9:43 
GeneralRe: iTextSharp set and flatten layers Pin
bkwooten15-May-09 4:56
bkwooten15-May-09 4:56 
GeneralRe: iTextSharp set and flatten layers Pin
Dave Kreskowiak15-May-09 12:04
mveDave Kreskowiak15-May-09 12:04 
GeneralRe: iTextSharp set and flatten layers Pin
bkwooten18-May-09 5:48
bkwooten18-May-09 5:48 
QuestionMultiSelection combo gets hidden in a Frame Pin
Nitin198114-May-09 7:14
Nitin198114-May-09 7:14 
Questiondatatype [modified] Pin
Ankit Aneja14-May-09 5:48
Ankit Aneja14-May-09 5:48 
AnswerRe: datatype Pin
Dave Kreskowiak14-May-09 7:12
mveDave Kreskowiak14-May-09 7:12 
GeneralRe: datatype Pin
Zaegra14-May-09 8:56
Zaegra14-May-09 8:56 
GeneralRe: datatype Pin
Dave Kreskowiak14-May-09 9:33
mveDave Kreskowiak14-May-09 9:33 
GeneralRe: datatype Pin
Zaegra14-May-09 11:17
Zaegra14-May-09 11:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.