Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

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

charlestorno143

Recruit
Basic Member
Messages
1
Reaction score
0
Points
16
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. :salute:
 
Last edited:
Back
Top Bottom