• 04-09-2008, 23:49:23
    #1
    Üyeliği durduruldu
    merhaba lar..

    asp ile bir sorunum var.

    üye girişi ve kontrolü yapabilmek için önce bir veri tabanı bağlantısı yaptım. (conn.asp) üye girişi için login.asp ve kontrol için login_check.asp yaptım. sorun login_check.asp de. execute komutunda hata veriyor

    örnek kodlarım şöyle

    conn.asp

    <%
    Set baglan = Server.CreateObject("ADODB.Connection")
    baglan.open "Provider=Microsoft.JET.OLEDB.4.0; Data Source=" & Server.Mappath("dbmx.mdb")
    %>

    ------------------------------------------------------------------------------------------------------------------

    login_check.asp kodları

    <!--# include file"conn.asp" -->

    <%
    dim kullanici,pass
    kullanici = Request.form("kullanici")
    pass = Request.form("pass")

    if kullanici ="" or pass ="" then
    response.write"Lütfen Form da boş alan bırakmayın"
    response.end
    end if

    sql = "select * from uyeler where kullanici= '"& kullanici &"' and pass = '"& pass &"'"
    set kontrol = baglan.execute(sql)

    if kontrol.eof then


    Response.Write "<script>alert('Hata !!! Veritabanında böyle bir kullanıcı yok...')</script>"
    Response.Write "<yasak kod meda http-equiv='Refresh' content='0; URL=login.asp'>"
    response.end
    else
    session("logindogrumu") = "evet"
    session("id") = check("id")
    session("kullanici") = check("kullanici")
    end if
    response.redirect"default.asp"

    %>
    ----------------------------------------------------------------------------------------------

    login_check.asp de verdiği hata şu

    Microsoft VBScript runtime error '800a01a8'

    Object required: 'baglan'

    /login_check.asp, line 14

    --------------------------------------------------------------------------

    yardımcı olabilecek arkadaş varsa sevinirim. teşekkürler
  • 05-09-2008, 00:09:59
    #2
    Alıntı
    <%
    dim kullanici,pass
    kullanici = Request.form("kullanici")
    pass = Request.form("pass")

    if kullanici ="" or pass ="" then
    response.write"Lütfen Form da boş alan bırakmayın"
    response.end
    end if

    Set gir = baglan.Execute("select * from uyeler where kullanici= '"& kullanici &"' and pass = '"& pass &"'")

    if gir.eof then

    Response.Write "<script>alert('Hata !!! Veritabanında böyle bir kullanıcı yok...')</script>"
    Response.Write "<yasak kod meda http-equiv='Refresh' content='0; URL=login.asp'>"
    response.end
    else
    session("logindogrumu") = "evet"
    session("id") = check("id")
    session("kullanici") = check("kullanici")
    end if
    response.redirect"default.asp"

    %>
    şu şekilde denermisin.
  • 05-09-2008, 14:13:00
    #3
    Üyeliği durduruldu
    Verdiğiniz kodları şu şekilde denedim HTTP500 hatası verdi bu sefer
    ----------------------------------------------------------------------------------
    <!--# include file="ayar.asp" -->

    <%
    dim kullanici,pass
    kullanici = Request.form("kullanici")
    pass = Request.form("pass")

    if kullanici ="" or pass ="" then
    response.write"Lütfen Form da boş alan bırakmayın"
    response.end
    end if

    Set gir = baglan.Execute("select * from uyeler where kullanici= '"& kullanici &"' and pass = '"& pass &"'")

    if gir.eof then

    Response.Write "<script>alert('Hata !!! Veritabannda byle bir kullanc yok...')</script>"
    Response.Write "<meta http-equiv='Refresh' content='0; URL=login.asp'>"
    response.end
    else
    session("logindogrumu") = "evet"
    session("id") = gir("id")
    session("kullanici") =gir("kullanici")
    end if
    response.redirect"default.asp"
    response.end
    %>
  • 05-09-2008, 22:31:49
    #4
    <%
    dim kullanici,pass
    kullanici = Request.form("kullanici")
    pass = Request.form("pass")

    if kullanici ="" or pass ="" then
    response.write"Lütfen Form da boş alan bırakmayın"
    response.end
    end if
    set kontrol = Server.CreateObject("ADODB.RecordSet")
    sql = "select * from uyeler where kullanici= '"& kullanici &"' and pass = '"& pass &"'"
    kontrol.open sql,baglan,1,3
    if kontrol.eof then
    Response.Write "<script>alert('Hata !!! Veritabanında böyle bir kullanıcı yok...')</script>"
    Response.Write "<yasak kod meda http-equiv='Refresh' content='0; URL=login.asp'>"
    response.end
    else
    session("logindogrumu") = "evet"
    session("id") = check("id")
    session("kullanici") = check("kullanici")
    end if
    response.redirect"default.asp"

    %>

    Şu Şekil Denermisiniz
  • 05-09-2008, 22:41:40
    #5
    Eposta Aktivasyonu Gerekmekte
    ilk mesajınızda <!--# include file"conn.asp" --> yazmışsınız...
    <!--# include file="conn.asp" --> olacak "=" işareti eksik...
    baglan tanımlanmadığı için object req hatası veriyor...

    edit: recordset açması mantıksız. her seferinde recordset açmamanızı tavsiye ederim
  • 07-09-2008, 11:34:49
    #6
    Üyeliği durduruldu
    En son olarak böyle denedim gene hata verdi
    -----------------------------------------------------------------
    <!--# include file="ayar.asp" -->

    <%
    dim kullanici,pass
    kullanici = Request.form("kullanici")
    pass = Request.form("pass")

    if kullanici ="" or pass ="" then
    response.write"Lütfen Form da boş alan bırakmayın"
    response.end
    end if

    dim kontrol
    Set kontrol = Server.CreateObject("adodb.recordset")
    sql = "select * from uyeler where kullanici= '"& kullanici &"' and pass = '"& pass &"'"
    kontrol.open SQL,baglan,1,3

    if not kont.eof then
    session("logindogrumu") = "evet"
    session("id") = kontrol("id")
    session("kullanici") = kontrol("kullanici")

    else

    Response.Write "<script>alert('Hata !!! Veritabanında böyle bir kullanıcı yok...')</script>"
    Response.Write "<meta http-equiv='Refresh' content='0; URL=login.asp'>"
    response.end
    end if
    %>
    -----------------------------------------------------------------------------------
    verdiği hata :
    ADODB.Recordset error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

    /login_check.asp, line 16