Merhaba,
Vb 6.0 da bir projem var ve bir noktada takıldım kaldım. Aslında düzgün çalışıyor ve kayıtları getiriyor ama boş olan satırları bir türlü silemiyorum yardımcı olabilirmisiniz. Kodları gönderiyorum.
Bir döngü ile veya başka bir şekilde boş satırların silinmesini istiyorum.
Saygılarımla.
Private Sub Command1_Click()
On Local Error Resume Next
Dim Conn As New ADODB.Connection
Dim RS As New ADODB.Recordset
Dim Dal As ListItem
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=O:\programlar\operasyon.mdb"
Conn.Open
ListView1.ListItems.Clear
RS.Open "Select * from murat", Conn, adOpenKeyset, adLockOptimistic
Do Until RS.EOF
Set Dal = ListView1.ListItems.Add(, "No" & RS(0), RS(0))
ListView.AddItem RS![FİRMA İSMİ] & "|" & RS![PAZARLAMACI] & "|" & "|" & RS![İŞLEM TUTARI] & "|" & RS![NET ÖDENEN] & "|" & RS![FAİZ ORANI]
aa = RS![İŞLEM TARİHİ]
If aa >= DTPicker1 And aa <= DTPicker2 Then
If Not IsNull(RS(1)) Then Dal.SubItems(1) = RS(1)
If Not IsNull(RS(2)) Then Dal.SubItems(2) = RS(2)
If Not IsNull(RS(3)) Then Dal.SubItems(3) = RS(3)
If Not IsNull(RS(4)) Then Dal.SubItems(4) = RS(4)
If Not IsNull(RS(5)) Then Dal.SubItems(5) = RS(5)
If Not IsNull(RS(6)) Then Dal.SubItems(6) = RS(6)
If Not IsNull(RS(7)) Then Dal.SubItems(7) = RS(7)
If Not IsNull(RS(8)) Then Dal.SubItems(8) = RS(8)
If Not IsNull(RS(9)) Then Dal.SubItems(9) = RS(9)
If Not IsNull(RS(10)) Then Dal.SubItems(10) = RS(10)
If Not IsNull(RS(11)) Then Dal.SubItems(11) = RS(11)
If Not IsNull(RS(12)) Then Dal.SubItems(12) = RS(12)
If Not IsNull(RS(13)) Then Dal.SubItems(13) = RS(13)
If Not IsNull(RS(14)) Then Dal.SubItems(14) = RS(14)
If Not IsNull(RS(15)) Then Dal.SubItems(15) = RS(15)
If Not IsNull(RS(16)) Then Dal.SubItems(16) = RS(16)
If Not IsNull(RS(17)) Then Dal.SubItems(17) = RS(17)
If Not IsNull(RS(18)) Then Dal.SubItems(18) = RS(18)
End If
RS.MoveNext
Loop
RS.Close
En Sub
Vb 6.0 da bir projem var ve bir noktada takıldım kaldım. Aslında düzgün çalışıyor ve kayıtları getiriyor ama boş olan satırları bir türlü silemiyorum yardımcı olabilirmisiniz. Kodları gönderiyorum.
Bir döngü ile veya başka bir şekilde boş satırların silinmesini istiyorum.
Saygılarımla.
Private Sub Command1_Click()
On Local Error Resume Next
Dim Conn As New ADODB.Connection
Dim RS As New ADODB.Recordset
Dim Dal As ListItem
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=O:\programlar\operasyon.mdb"
Conn.Open
ListView1.ListItems.Clear
RS.Open "Select * from murat", Conn, adOpenKeyset, adLockOptimistic
Do Until RS.EOF
Set Dal = ListView1.ListItems.Add(, "No" & RS(0), RS(0))
ListView.AddItem RS![FİRMA İSMİ] & "|" & RS![PAZARLAMACI] & "|" & "|" & RS![İŞLEM TUTARI] & "|" & RS![NET ÖDENEN] & "|" & RS![FAİZ ORANI]
aa = RS![İŞLEM TARİHİ]
If aa >= DTPicker1 And aa <= DTPicker2 Then
If Not IsNull(RS(1)) Then Dal.SubItems(1) = RS(1)
If Not IsNull(RS(2)) Then Dal.SubItems(2) = RS(2)
If Not IsNull(RS(3)) Then Dal.SubItems(3) = RS(3)
If Not IsNull(RS(4)) Then Dal.SubItems(4) = RS(4)
If Not IsNull(RS(5)) Then Dal.SubItems(5) = RS(5)
If Not IsNull(RS(6)) Then Dal.SubItems(6) = RS(6)
If Not IsNull(RS(7)) Then Dal.SubItems(7) = RS(7)
If Not IsNull(RS(8)) Then Dal.SubItems(8) = RS(8)
If Not IsNull(RS(9)) Then Dal.SubItems(9) = RS(9)
If Not IsNull(RS(10)) Then Dal.SubItems(10) = RS(10)
If Not IsNull(RS(11)) Then Dal.SubItems(11) = RS(11)
If Not IsNull(RS(12)) Then Dal.SubItems(12) = RS(12)
If Not IsNull(RS(13)) Then Dal.SubItems(13) = RS(13)
If Not IsNull(RS(14)) Then Dal.SubItems(14) = RS(14)
If Not IsNull(RS(15)) Then Dal.SubItems(15) = RS(15)
If Not IsNull(RS(16)) Then Dal.SubItems(16) = RS(16)
If Not IsNull(RS(17)) Then Dal.SubItems(17) = RS(17)
If Not IsNull(RS(18)) Then Dal.SubItems(18) = RS(18)
End If
RS.MoveNext
Loop
RS.Close
En Sub
