Private Sub cmdAdd_Click()
Dim rs As ADODB.Recordset
Dim strsql As String
strsql = "insert into Issue_Tab(Startno, End no, Issuedate, Brncode) Values( ' " & txtstartno.Text & " ' , ' " &
txtendo.Text & " ' , ' " & txtdate.Text & " ' , where Brncode = ' " & txtbrncode.Text & " ' ) "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox " Saved"
Me.filllistview
End Sub
Sub filllistview()
strsql = "select * from Issue_Tab"
Set rs = pcnl.Execute(strsql)
ListView1.ListItems.Clear
Do While Not rs.EOF
Set Item = ListView1.ListItems.Add(, , rs!Startno)
Item.SubItems(1) = rs!Endno & ""
Item.SubItems(2) = rs!Issuedate & ""
Item.SubItems(3) = rs!Brncode & ""
rs.MoveNext
Loop
Set rs = Nothing
End Sub
Private Sub Command1_Click()
Dim strsql As String
Dim rs As ADODB.Recordset
strsql = " Delete from Issue_tab where Brncode = ' " & txtbrncode.Text & " ' "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox "Delete"
Me.filllistview
End Sub
Private Sub Form_Load()
Me.filllistview
End Sub
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
With Item
txtstartno.Text = Item
txtendno.Text = .SubItems(1)
txtdate.Text = .SubItems(2)
txtbrncode.Text = .SubItems(3)
End With
End Sub
Private Sub txtupdate_Click()
Dim strsql As String
Dim rs As ADODB.Recordset
strsql = " update Issue_Tab set startno = ' " & txtstartno.Text & " ' , Endno = ' " & txtendno.Text & " ' , Issuedate = ' " & txtdate.Text & " ' where Brncode = ' " & txtbrncode.Text & " ' "
Set rs = pcnl.Execute(strsql)
Set rs = Nothing
MsgBox " Updated"
Me.filllistview
End Sub
""""私は自分のプロジェクトでこのコーディングを行い、モジュールも追加しました....しかし、コーディングの問題は、エラーが表示されておらず、機能しておらず、私のデータベースに変更が表示されていないことですsql.....だから、私は会社でプロジェクトを提出しなければならないので、できるだけ早く私を助けてください........
事前に感謝..これに私を助けてくれて..!