Welcome back, Guest!
Register
Forgot your Password?
Results 1 to 1 of 1
  1. #1

    Pray [HELP] - VB.NET Display data on textbox on junction table.

    I already fixed my problem Thanks.



    Hello guys pwedeng magpatulong. Gusto ko sana i display yung list ng subject ng student base sa student ID nya.

    Ito ang table ko

    Student , subject_bsit , student_subject ito yung junction table.


    Query ko
    Code:
    sql = "SELECT subject_name " & _
                " FROM student_subject " & _
                " INNER JOIN subject_bsit ON subject_bsit.subject_id = student_subject.sub_id" & _
                " where student_subject.student_id='" & tbox_studentID.Text & "'"
    My vbcode still error
    Code:
    cmd = New MySqlCommand(sql, myconn)
            dr = cmd.ExecuteReader
            Dim cnt As Integer = 1
    
    
            While dr.Read = True
    
    
                Dim txt As TextBox = DirectCast(Controls.Find(String.Format("text{0}", cnt), False).FirstOrDefault(), TextBox)
    
    
                txt.Text = dr(0).ToString()
    
    
                cnt += 1
    
    
            End While
            dr.Close()

    Thank you so much ang gusto ko lang gawin is i display ko sa textbox yung bawat subject base sa student ID .
    baka tnungin nyo ako bakit hindi datagrid view im working in something na hindi po datagrid view ang sagot marmaing salamat po.
    Last edited by charlestorno143; 17th Mar 2019 at 21:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •