Dělám ve vb.net 2008 expres a při použití dotazu:
Dim strSQL As String = "SELECT Q.ID, Q.Question, Q.IDa, Q.IDb, Q.IDc, Q.Picture, A.ID, A.Answer As AnswerA, B.ID, B.Answer As AnswerB, C.ID, C.Answer As AnswerC FROM Questions Q INNER JOIN Answers A ON A.ID = Q.IDa INNER JOIN Answers B ON B.ID = Q.IDb INNER JOIN Answers C ON C.ID = Q.IDc WHERE (Q.ID = " & Me.lstPoQuestions.SelectedItems(0).SubItems(0).Text & ")"
mi vypíše hlášku syntaktická chyba. Lidi nevíte proč? Tento dotaz mi normálně funguje:
Dim strSQL As String = "SELECT Q.ID, Q.Question, Q.IDa, Q.Picture, A.ID, A.Answer As AnswerA FROM Questions Q INNER JOIN Answers A ON A.ID = Q.IDa WHERE (Q.ID = " & Me.lstPoQuestions.SelectedItems(0).SubItems(0).Text & ")"
|