0
這很奇怪,我有一個網格工作,並顯示它需要什麼,兩個不是,他們都寫同樣的方式。DataGridView不顯示數據VB.NET
Private Sub Form2_Shown(sender As Object, e As EventArgs) Handles Me.Shown
access.ExecQuery("SELECT emotion1,emotion2,emotion3,emotion4,emotion5, " & _
"situation1,situation2,situation3, " & _
"physical1,physical2,physical3,physical4,physical5 " & _
"FROM emotionlogdb ORDER BY id DESC;")
If Not String.IsNullOrEmpty(access.exception) Then
MsgBox(access.exception) : Exit Sub
End If
DataGridView1.DataSource = access.DBDT
End Sub
以及不兩個代碼:
Private Sub Form5_Shown(sender As Object, e As EventArgs) Handles Me.Shown
access.ExecQuery("SELECT journal FROM journalDB ORDER BY id DESC")
If Not String.IsNullOrEmpty(access.exception) Then
MsgBox(access.exception) : Exit Sub
End If
DataGridView1.DataSource = access.DBDT
End Sub
和:
Private Sub Form6_Shown(sender As Object, e As EventArgs) Handles MyBase.Load
Dim sit As Integer = Alg.sitMode
Dim em As Integer = Alg.emMode
Access.ExecQuery("SELECT EmPlusSitMemo FROM TrendsDB WHERE EmotionID1= " & em & "AND SitID1= " & sit & ";")
If Not String.IsNullOrEmpty(Access.exception) Then
MsgBox(Access.exception) : Exit Sub
End If
DataGridView1.DataSource = Access.DBDT
End Sub
我在做什麼錯,工程
碼?