Click here to Skip to main content
15,892,059 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: compare files with hash tables, find dupe files in folder, manage hash table Pin
NikWing6-Apr-10 13:02
NikWing6-Apr-10 13:02 
QuestionVb.net & SQLite Pin
Ben Magee5-Apr-10 3:25
Ben Magee5-Apr-10 3:25 
AnswerRe: Vb.net & SQLite Pin
Sebastian Br.5-Apr-10 21:18
Sebastian Br.5-Apr-10 21:18 
QuestionRecursive Function [modified] Pin
Andy_L_J4-Apr-10 16:51
Andy_L_J4-Apr-10 16:51 
AnswerRe: Recursive Function Pin
riced4-Apr-10 23:41
riced4-Apr-10 23:41 
GeneralRe: Recursive Function Pin
Andy_L_J5-Apr-10 2:35
Andy_L_J5-Apr-10 2:35 
GeneralRe: Recursive Function [modified] Pin
riced5-Apr-10 4:19
riced5-Apr-10 4:19 
AnswerRe: Recursive Function Pin
William Winner7-Apr-10 8:18
William Winner7-Apr-10 8:18 
Are you aware that you could just replace the Exit For with a Return dt?

If the only purpose of exiting the for loop is to finish the function, you can simply return the value. If it still doesn't execute the return, then you haven't gotten into that If block.

So, instead of:
VB
ElseIf i = dt.Rows.Count - 1 Then
    Dim nr As DataRow = dt.NewRow
    nr.ItemArray = nra

    dt.Rows.Add(nr)

    Exit For ' Problem here - Routine does not exit.
    ' Instead, jumps to the 'Next' statement

End If


VB
ElseIf i = dt.Rows.Count - 1 Then
    Dim nr As DataRow = dt.NewRow
    nr.ItemArray = nra

    dt.Rows.Add(nr)

    return dt
End If


And are you stepping through the whole process? Is that where you're seeing that it's not getting to the return? Because if you are using recursion, after you call the SetNewDataRow recursively, after it returns, it's going to just to Next and it might appear like it didn't work.
QuestionGet the parent objet or parent level in nested lists Pin
norrisMiou4-Apr-10 0:51
norrisMiou4-Apr-10 0:51 
AnswerRe: Get the parent objet or parent level in nested lists Pin
DaveAuld4-Apr-10 2:28
professionalDaveAuld4-Apr-10 2:28 
GeneralRe: Get the parent objet or parent level in nested lists Pin
norrisMiou4-Apr-10 2:56
norrisMiou4-Apr-10 2:56 
GeneralRe: Get the parent objet or parent level in nested lists Pin
DaveAuld4-Apr-10 5:36
professionalDaveAuld4-Apr-10 5:36 
AnswerRe: Get the parent objet or parent level in nested lists Pin
Alan N4-Apr-10 6:04
Alan N4-Apr-10 6:04 
GeneralRe: Get the parent objet or parent level in nested lists Pin
norrisMiou5-Apr-10 7:26
norrisMiou5-Apr-10 7:26 
GeneralRe: Get the parent objet or parent level in nested lists Pin
Alan N5-Apr-10 13:19
Alan N5-Apr-10 13:19 
GeneralRe: Get the parent objet or parent level in nested lists Pin
norrisMiou5-Apr-10 15:29
norrisMiou5-Apr-10 15:29 
QuestionLinking Databases to VB Applications Pin
Razanust3-Apr-10 19:36
Razanust3-Apr-10 19:36 
AnswerRe: Linking Databases to VB Applications Pin
riced3-Apr-10 23:59
riced3-Apr-10 23:59 
AnswerRe: Linking Databases to VB Applications Pin
εїзεїзεїз4-Apr-10 0:19
εїзεїзεїз4-Apr-10 0:19 
GeneralRe: Linking Databases to VB Applications Pin
Razanust4-Apr-10 4:40
Razanust4-Apr-10 4:40 
GeneralRe: Linking Databases to VB Applications Pin
riced4-Apr-10 4:57
riced4-Apr-10 4:57 
AnswerRe: Linking Databases to VB Applications Pin
Luc Pattyn4-Apr-10 5:09
sitebuilderLuc Pattyn4-Apr-10 5:09 
AnswerRe: Linking Databases to VB Applications Pin
Luc Pattyn4-Apr-10 5:13
sitebuilderLuc Pattyn4-Apr-10 5:13 
GeneralRe: Linking Databases to VB Applications Pin
Razanust4-Apr-10 8:15
Razanust4-Apr-10 8:15 
QuestionProblem with unrar.dll and decompressor-class Pin
Maik Lange2-Apr-10 19:38
Maik Lange2-Apr-10 19:38 

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.