implant


  Aktif KonularAktif Konular  Forum Üyelerini GösterÜye Listesi  Forumu AraArama  YardımYardım
  Kayıt OlKayıt Ol  GirişGiriş
ASP / ASP.NET
 ASPTurkiye.com Forum : ASP / ASP.NET
Konu Konu: Üçlü combo bağlama (İl ilçe semt sorunu) Yanıt YazYeni Konu Gönder
Yazanlarda
Mesaj << Önceki Konu | Sonraki Konu >>
anemon_es
Yeni Üye
Yeni Üye


Kayıt Tarihi: 07-Ekim-2007
Ülke: Turkiye
Gönderilenler: 1
Gönderen: 07-Ekim-2007 Saat 12:10 | Kayıtlı IP Alıntı anemon_es

Arkadaşlar mrb. elimde il ilçe ve semtleri birbirine bağlanmış accessde hazırlanmış veri tabanı var. Asp ile bunları birbirine bağlamak istiyorum. denedim ama olmadı. sizede lazım olabilir.Birde siz bakarsanız çok sevinirim.Teşekkürler.

 veri tabanı burada

http://rapidshare.com/files/61221536/il.rar

Access de veri tabanı adı :  il

İçindeki tablolar sehir, ilçeler, semt

Sehir ----/    id ve sehir alanları

İlçeler---/    ilceid, ilçe ve sehir alanları

Semt----/      semtid, semt, ilçeid alanları

Kodlarda problem var


<%
dbPath = Server.MapPath("iller.mdb")
Set Baglantim = Server.CreateObject("ADODB.Connection")
Baglantim.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dbPath)
%>

</td></tr><tr>
             <td align=left>
               <table width="50%" border="2" cellspacing="0" cellpadding="0">
    <tr>
     <td height="20" align=right class="menukisi">..::Sehir </td>
      <td><select name="il" id="IlListesi" onchange="document.location.href='default.asp?SehirKodu='+ this.options[this.selectedIndex].value;">
        <% If Request("SehirKodu") = "" Then %>
        <% 
  Set sehirs = Server.CreateObject("ADODB.RecordSet")
  sehirs.Open "SELECT * FROM sehir ", baglantim, 1, 3
 
  git = Request.QueryString("git")
if git="" then
git=1
end if%>
        <option selected>SEÇINIZ</option>
        <%

for i=1 to sehirs.recordcount
if sehirs.eof or sehirs.bof then exit for
%>
        <option value="<%=sehirs("id")%>"><%=sehirs("sehir")%> ;
          <%if sehirs.recordcount>0 then%>
        <%end if%>
          </option>
        <%sehirs.MoveNext
  Next %>
        <% end if%>
        <% If Request("SehirKodu") <> "" Then %>
        <% 
aaaaa=Request("SehirKodu")
  Set sehirs = Server.CreateObject("ADODB.RecordSet")
  sehirs.Open "SELECT * FROM sehir where id="&aaaaa, baglantim, 1, 3
 
  git = Request.QueryString("git")
if git="" then
git=1
end if%>
        <%

for i=1 to sehirs.recordcount
if sehirs.eof or sehirs.bof then exit for
%>
        <option value="<%=sehirs("id")%>"><%=sehirs("sehir")%> ;
          <%if sehirs.recordcount>0 then%>
        <%end if%>
          </option>
        <%sehirs.MoveNext
  Next %>
        <% end if%>
      </select></td>
    </tr>
    <tr>
     <td height="20" align=right class="menukisi">..::Ilçe</td>
      <td>
  
   <select name="ilce" id="IlceListesi">
        <% If Request("SehirKodu") <> "" Then %>
        <%
aaaaa=Request("SehirKodu")
  Set ilce = Server.CreateObject("ADODB.RecordSet")
  ilce.Open "SELECT * FROM ilceler where sehir="&aaaaa, baglantim, 1, 3
 
  git = Request.QueryString("git")
if git="" then
git=1
end if%>
        <%

for i=1 to ilce.recordcount
if ilce.eof or ilce.bof then exit for
%>
        <option value="<%=ilce("id")%>"><%=ilce("ilce")%>
        <%if ilce.recordcount>0 then%>
        <%end if%>
        </option>
        <%ilce.MoveNext
  Next %>
        <%end if%>
      </select></td>
    </tr>
    <tr>
      <td height="20" align=right class="menukisi">&nbsp;</td>
      <td><select name="il" id="IlListesi" onchange="document.location.href='default.asp?SehirKodu='+ this.options[this.selectedIndex].value;">
        <% If Request("SehirKodu") = "" Then %>
        <% 
  Set sehirs = Server.CreateObject("ADODB.RecordSet")
  sehirs.Open "SELECT * FROM sehir ", baglantim, 1, 3
 
  git = Request.QueryString("git")
if git="" then
git=1
end if%>
        <option selected>SEÇINIZ</option>
        <%

for i=1 to sehirs.recordcount
if sehirs.eof or sehirs.bof then exit for
%>
        <option value="<%=sehirs("id")%>"><%=sehirs("sehir")%> ;
          <%if sehirs.recordcount>0 then%>
        <%end if%>
          </option>
        <%sehirs.MoveNext
  Next %>
        <% end if%>
        <% If Request("SehirKodu") <> "" Then %>
        <% 
aaaaa=Request("SehirKodu")
  Set sehirs = Server.CreateObject("ADODB.RecordSet")
  sehirs.Open "SELECT * FROM sehir where id="&aaaaa, baglantim, 1, 3
 
  git = Request.QueryString("git")
if git="" then
git=1
end if%>
        <%

for i=1 to sehirs.recordcount
if sehirs.eof or sehirs.bof then exit for
%>
        <option value="<%=sehirs("id")%>"><%=sehirs("sehir")%> ;
          <%if sehirs.recordcount>0 then%>
        <%end if%>
          </option>
        <%sehirs.MoveNext
  Next %>
        <% end if%>
      </select></td>
    </tr>
  </table> 
  <p>&nbsp; </p></td>



Düzenleyen anemon_es 09-Ekim-2007 Saat 01:53
Yukarı Dön Göster anemon_es's Özellikler Diğer Mesajlarını Ara: anemon_es
 

Eğer Bu Konuya Cevap Yazmak İstiyorsanız İlk Önce Giriş
Eğer Kayıtlı Bir Kullanıcı Değilseniz İlk Önce Kayıt Olmalısınız

  Yanıt YazYeni Konu Gönder
Yazıcı Sürümü Yazıcı Sürümü

Forum Atla
Kapalı Foruma Yeni Konu Gönderme
Kapalı Forumdaki Konulara Cevap Yazma
Kapalı Forumda Cevapları Silme
Kapalı Forumdaki Cevapları Düzenleme
Kapalı Forumda Anket Açma
Açık Forumda Anketlerde Oy Kullanma

Powered by Web Wiz Forums version 7.91
Copyright ©2001-2004 Web Wiz Guide

Bu Sayfa 0,0938 Saniyede Yüklendi.