• 10-08-2010, 13:59:57
    #1
    Üyeliği durduruldu
    merhaba.

    düşünün ki bir sayfada bazı veriler sıralanıyor. bir link ile email.asp ye yönlendiriliyor ve bu sayede kullanıcının kayıtlı olan mail adresine tablo yollanıyor.

    bu işlemlerin hepsi aşağıdaki kodun üst kısımlarında yapılıyor HTML oluşturma kısmına gelindiğinde verilerin alt alta sıralanması için döngü oluşturmam gerekiyor. kod aşağıda
    strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf _
    		& "<table width=""860"" border=""1"">" & vbcrlf _
    		& "<tr>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Başvuru Numarası" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Başvuru Tipi" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Marka adı" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Sınıflar" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Başvuru Tarihi" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Yenileme Tarihi" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& "Başvuru Ülkesi" & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "</tr>" & vbcrlf _
    		& "</table>" & vbcrlf _
    ' BURADAN İTİBAREN DÖNGÜ BAŞLAMALI 
    		& "<table width=""860"" border=""1"" cellpadding=""0"" cellspacing=""0"">" & vbcrlf _
    		& "<tr>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		&  objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		&  objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		&  objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		&  objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    		& "<th scope=""col"">" & vbcrlf _
    		& objrs("kod_no") & vbcrlf _
    		& "</th>" & vbcrlf _
    ' DÖNGÜ BURADA BİTMELİ
    Kod içindeki 'burada döngü başlamalı ve 'döngü burada bitmeli kısmını objrs nin record count'ı kadar tekrar etmeli. Fakat
    <% do while not objrs.eof
    ile başlatıp
    objrs.movenext 
    loop
    ile bitirince
    Alıntı
    Hata Tipi:
    Microsoft VBScript derleme hatası (0x800A0401)
    Deyim sonu gerekli
    /test/email_html.asp, line 87
    do while not objrs.eof
    hatası alıyorum.

    çözüm önerebilecek arkadaşların mesajlarını bekliyorum
  • 11-08-2010, 00:36:38
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Sanırım şöyle birşey istiyorsun.

    ' BURADAN İTİBAREN DÖNGÜ BAŞLAMALI

    bolum2 = strBody
    bolum2 = bolum2 & "<table width=""860"" border=""1"" cellpadding=""0"" cellspacing=""0"">" & vbcrlf _
    & "<tr>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    bolum2 = ""

    ' DÖNGÜ BURADA BİTMELİ
  • 11-08-2010, 00:39:31
    #3
    Üyeliği durduruldu
    denom adlı üyeden alıntı: mesajı görüntüle
    Sanırım şöyle birşey istiyorsun.

    ' BURADAN İTİBAREN DÖNGÜ BAŞLAMALI

    bolum2 = strBody
    bolum2 = bolum2 & "<table width=""860"" border=""1"" cellpadding=""0"" cellspacing=""0"">" & vbcrlf _
    & "<tr>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    bolum2 = ""

    ' DÖNGÜ BURADA BİTMELİ
    öncelikle cevap için teşekkürler.

    bu kısımda döngü olsun istiyorum. Kayıt sayısı kadar bu kısmı tekrar etsin. Yani bir liste haline getirsin.
  • 11-08-2010, 00:46:57
    #4
    muhtemelen hatayı döngü içinde üst kısma kendini bağlayamadığı için veriyor.
    Yani veriyi içerde ne şekilde döndürdüğün ile ilgili değil.

    strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & vbCrLf _
    & "<table width=""860"" border=""1"">" & vbcrlf _
    & "<tr>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Başvuru Numarası" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Başvuru Tipi" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Marka adı" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Sınıflar" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Başvuru Tarihi" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Yenileme Tarihi" & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & "Başvuru Ülkesi" & vbcrlf _
    & "</th>" & vbcrlf _
    & "</tr>" & vbcrlf _
    & "</table>" & vbcrlf _
    ' BURADAN İTİBAREN DÖNGÜ BAŞLAMALI

    for i = 1 to objrs.recordcount
    if not objrs.eof then

    bolum2 = strBody
    bolum2 = bolum2 & "<table width=""860"" border=""1"" cellpadding=""0"" cellspacing=""0"">" & vbcrlf _
    & "<tr>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    & "<th scope=""col"">" & vbcrlf _
    & objrs("kod_no") & vbcrlf _
    & "</th>" & vbcrlf _
    bolum2 = ""

    end if
    objrs.movenext()
    next

    ' DÖNGÜ BURADA BİTMELİ
  • 11-08-2010, 01:11:50
    #5
    Üyeliği durduruldu
    tamam yarın sabah deneyeceğim işyerinde. teşekkür ederim.
  • 11-08-2010, 02:59:40
    #6
    bu bölümü yanlış yapmışım.

    bolum2 = strBody
    bolum2 = bolum2

    bunun yerine sadece bunu kullan
    bolum2 = "<table width.....
  • 11-08-2010, 09:43:35
    #7
    Üyeliği durduruldu
    bu hatayı verdi ;

    Hata Tipi:
    Microsoft VBScript derleme hatası (0x800A0401)
    Deyim sonu gerekli
    /test/email_html.asp, line 87
    for i = 1 to objrs.recordcount
  • 11-08-2010, 12:49:07
    #8
    🌐 𝘀𝗼𝗰𝗶𝗳𝗹𝘆.𝗰𝗼𝗺
    Veritabanı MySQL ile recordcount çalışmaz.
  • 11-08-2010, 12:56:38
    #9
    Üyeliği durduruldu
    tolgasen adlı üyeden alıntı: mesajı görüntüle
    Veritabanı MySQL ile recordcount çalışmaz.
    DB Access.