Click here to Skip to main content
15,914,350 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Equivalent to the SQL code is? Pin
Henry Minute2-Nov-09 2:24
Henry Minute2-Nov-09 2:24 
GeneralRe: Equivalent to the SQL code is? Pin
Milad.Biroonvand2-Nov-09 2:40
Milad.Biroonvand2-Nov-09 2:40 
GeneralRe: Equivalent to the SQL code is? Pin
DaveAuld2-Nov-09 2:47
professionalDaveAuld2-Nov-09 2:47 
GeneralRe: Equivalent to the SQL code is? Pin
Milad.Biroonvand2-Nov-09 3:01
Milad.Biroonvand2-Nov-09 3:01 
GeneralRe: Equivalent to the SQL code is? Pin
Steven J Jowett2-Nov-09 8:19
Steven J Jowett2-Nov-09 8:19 
GeneralRe: Equivalent to the SQL code is? Pin
Henry Minute2-Nov-09 5:04
Henry Minute2-Nov-09 5:04 
GeneralRe: Equivalent to the SQL code is? Pin
Milad.Biroonvand2-Nov-09 21:26
Milad.Biroonvand2-Nov-09 21:26 
GeneralRe: Equivalent to the SQL code is? Pin
Milad.Biroonvand6-Nov-09 19:01
Milad.Biroonvand6-Nov-09 19:01 
code is

Public Class Form1
    Public DsCenter As New DataSet
    Public Count As Integer = 1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        FillDsCenter()
        LoadTV()
    End Sub

    Public Sub FillDsCenter()
        Dim StrSql As String
        Dim da As New OleDbDataAdapter
        If Con.State = ConnectionState.Closed Then
            Con.Open()
        End If
        StrSql = "SELECT  *  FROM Folder"
        da = New OleDbDataAdapter(StrSql, Con)
        DsCenter.Clear()
        da.Fill(DsCenter, "tbl")
        Con.Close()
    End Sub


    Private Sub LoadTV()

        Dim K, I, J, L As Integer '1
        Dim T, R, Pr As String '2
        Count = 1 '3 
        For I = 1 To DsCenter.Tables("tbl").Rows.Count '4
            K = DsCenter.Tables("tbl").Rows(Count - 1).Item("Level") '5
            If J < K Then J = K '6
            If Not (Count = DsCenter.Tables("tbl").Rows.Count) Then Count += 1
        Next 'ok
        Count = 1 'ok 
        For I = 0 To J 'ok
            Count = 1 'ok
            For L = 1 To DsCenter.Tables("tbl").Rows.Count 'ok
                K = DsCenter.Tables("tbl").Rows(Count - 1).Item("Level") 'ok
                T = DsCenter.Tables("tbl").Rows(Count - 1).Item("head") 'ok
                R = DsCenter.Tables("tbl").Rows(Count - 1).Item("ID") 'ok
                Pr = DsCenter.Tables("tbl").Rows(Count - 1).Item("Parent") 'ok

                If I = 0 And K = 0 Then 'ok
                    TV.Nodes.Add(R, T, "bc", "bo") 'ok
                Else 'ok
                    If K = I Then 'ok

                        TV.Nodes.Find(Pr, True)(0).Nodes.Add(R, T, "gc", "go") 'ok
                    End If 'ok
                End If 'ok

                If Count <> DsCenter.Tables("tbl").Rows.Count Then Count += 1
            Next
        Next


        '*** table matn
        'Count = 1
        'For I = 1 To DsCenter.Tables("tbl").Rows.Count
        '    K = DsCenter.Tables("tbl").Rows(Count - 1).Item("Folder")
        '    R = DsCenter.Tables("tbl").Rows(Count - 1).Item("ID")
        '    T = DsCenter.Tables("tbl").Rows(Count - 1).Item("Head")
        '    TV.Nodes.Find("F" & K, True)(0).Nodes.Add("M" & R, T, "mc", "mo")
        '    If Count <> DsCenter.Tables("tbl").Rows.Count Then Count += 1
        'Next
    End Sub

QuestionI have to concate two strings by operator "/" Pin
KIDYA2-Nov-09 1:30
KIDYA2-Nov-09 1:30 
AnswerRe: I have to concate two strings by operator "/" Pin
Padmaraj Sivaraj2-Nov-09 2:11
Padmaraj Sivaraj2-Nov-09 2:11 
AnswerRe: I have to concate two strings by operator "/" Pin
Henry Minute2-Nov-09 2:14
Henry Minute2-Nov-09 2:14 
AnswerRe: I have to concate two strings by operator "/" Pin
DaveAuld2-Nov-09 2:16
professionalDaveAuld2-Nov-09 2:16 
AnswerRe: I have to concate two strings by operator "/" Pin
Luc Pattyn2-Nov-09 2:31
sitebuilderLuc Pattyn2-Nov-09 2:31 
QuestionNatural order sorting in vb Pin
herulee2-Nov-09 0:22
herulee2-Nov-09 0:22 
AnswerRe: Natural order sorting in vb Pin
helelark1232-Nov-09 1:02
helelark1232-Nov-09 1:02 
AnswerRe: Natural order sorting in vb Pin
Luc Pattyn2-Nov-09 1:17
sitebuilderLuc Pattyn2-Nov-09 1:17 
GeneralRe: Natural order sorting in vb Pin
herulee2-Nov-09 2:04
herulee2-Nov-09 2:04 
GeneralRe: Natural order sorting in vb Pin
Luc Pattyn2-Nov-09 2:10
sitebuilderLuc Pattyn2-Nov-09 2:10 
GeneralRe: Natural order sorting in vb Pin
herulee2-Nov-09 2:23
herulee2-Nov-09 2:23 
QuestionMemory Footprint Pin
EvanSaunders1-Nov-09 23:45
EvanSaunders1-Nov-09 23:45 
AnswerRe: Memory Footprint Pin
DaveAuld1-Nov-09 23:56
professionalDaveAuld1-Nov-09 23:56 
Questioncopy and paste textbox in form 1 to textbox in form2 Pin
offroaderdan1-Nov-09 23:16
offroaderdan1-Nov-09 23:16 
AnswerRe: copy and paste textbox in form 1 to textbox in form2 Pin
DaveAuld1-Nov-09 23:29
professionalDaveAuld1-Nov-09 23:29 
AnswerRe: copy and paste textbox in form 1 to textbox in form2 Pin
DaveAuld1-Nov-09 23:54
professionalDaveAuld1-Nov-09 23:54 
GeneralRe: copy and paste textbox in form 1 to textbox in form2 Pin
offroaderdan2-Nov-09 0:27
offroaderdan2-Nov-09 0:27 

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.