Forum

asp veri günce...
 
Bildirimler
Hepsini Temizle

asp veri güncelleme hakkında

2 Yazılar
2 Üyeler
0 Likes
510 Görüntüleme
(@serdaratacan)
Gönderiler: 244
Honorable Member
Konu başlatıcı
 

arkadaşlar merhaba bir sayfam var. veri güncelleme yaptım. sorunum veri güncelleyeceğim sayfaya girdiğimde direk değişiklikler kaydediliyor diyor ben hiçbişey yapmadan sayfayı güncelliyor. yardımcı olurmusunuz. veri güncelleme için eklediğim kısım sayfanın en altında koyu olan bölüm.

 

<%Sub oku%>
<%
Set Baglanti = Server.CreateObject("aDodb.connection")
Baglanti.Open "driver={microsoft access driver (*.mdb)}; DBQ=" & Server.MapPath("db/db")
id = request.QueryString("id")
Set Rs = Server.CreateObject("aDodb.recordSet")
Sor = "Select * From dal Where id="&id&""
Rs.Open Sor, Baglanti, 1,3

If Rs.EOF or Rs.BOF Then
else Rs("hit")=Rs("hit")+1
Rs.Update
End If
%>
<form name="form3" method="post" action="xdefault.asp?islem=oku&id=<%=Rs("id")%>">
<div class="container">
<p><%=Rs("web")%>&nbsp; Servisi Tarafından Girilen Arıza Bilgisi</p>
<table class="table table-bordered" width="460">
<thead>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">İd</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("id")%></td>
</tr>
</thead>
<tbody>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Yapacak Servis</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("grup")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">İsteyen Servis</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("web")%></td>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Yapılacak İş</th>
<td width="253" style="background-color: #DFF0D8 !important">
<textarea name="not0" class="form-control" id="not0" dir="ltr" rows="1" cols="22"><%=Rs("Not")%></textarea></td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Aciliyet Durumu</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("acil")%></td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Ekleyen Adı Soyadı </th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("adsoyad")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Ekleme Tarihi</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("tarih")%></td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Ünite No</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("adres")%></td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">

Bölüm</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("bolum")%> </td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">

Sistem</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("sistem")%></td>

</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">

Teçhizat No</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("techizat_no")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Arızanın Yeri</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("arizanin_yeri")%> </td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Arızanın Tahmini Süresi</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("ariza_tahmin_sure")%> </td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Arızanın Tamamlanma Süresi</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("ariza_tamam_sure")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">Ekip Sayısı</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("ekip_sayisi")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">İşin Durumu:</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("telefon")%></td>
</tr>
<tr>
<th align="left" width="457" style="background-color: #FF0000 !important" colspan="2">
<p align="center"><font color="#FFFF00">YAPILAN İŞ KONTROL FORMU</font></th>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">
Yarım Kalan İşler</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("isletme_veri")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">
Arızanın Durumu</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("arizanin_durumu")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">
Kontrol Eden Kişi</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("kontrol_name")%></td>
</tr>
<tr>
<th align="left" width="204" style="background-color: #D8EDF6 !important">
Son Kontrol Tarihi</th>
<td width="253" style="background-color: #DFF0D8 !important"><%=Rs("isletme_ar_tarih")%></td>
</tr>
</tbody>
</table>
<p></p>
<table class="table table-bordered">
<thead>
<tr>
<th>No</th>
<th>Yapılan İş</th>
<th>Ekleyen</th>
<th>Tarih</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td><%=Rs("sehir")%></td>
<td><%=Rs("ad")%></td>
<td><%=Rs("tarih2")%></td>
</tr>
<tr>
<td>2</td>
<td><%=Rs("sehir2")%>&nbsp;</td>
<td><%=Rs("ad2")%>&nbsp;</td>
<td><%=Rs("tarih22")%>&nbsp;</td>
</tr>
<tr>
<td>3</td>
<td><%=Rs("sehir3")%>&nbsp;</td>
<td><%=Rs("ad3")%>&nbsp;</td>
<td><%=Rs("tarih23")%>&nbsp;</td>
</tr>
<tr>
<td>4</td>
<td><%=Rs("sehir4")%>&nbsp;</td>
<td><%=Rs("ad4")%>&nbsp;</td>
<td><%=Rs("tarih24")%>&nbsp;</td>
</tr>
<tr>
<td>5</td>
<td><%=Rs("sehir5")%>&nbsp;</td>
<td><%=Rs("ad5")%>&nbsp;</td>
<td><%=Rs("tarih25")%>&nbsp;</td>
</tr>
</tbody>
</table>
<p>YAPILAN İŞ KONTROL FORMU</p>
<table border="1" width="52%">
<tr>
<td>Yarım Kalan İşler</td>
<td width="533">
<span class="style181">

<textarea class="form-control" rows="4" name="isletme_veri" id="isletme_veri" cols="64"></textarea></td>
</tr>
<tr>
<td>Arızanın Durumu</td>
<td width="533"><select class="form-control" size="1" name="arizanin_durumu" id="arizanin_durumu">
<option>Eksikler var </option>
<option>Arıza Tamamlandı</option>

</select></td>
</tr>
<tr>
<td>Kontrol Eden Kişi</td>
<td><%
Set baglanti = Server.CreateObject("ADODB.Connection")
baglanti.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/Data.mdb")
%>

<% if Session("durum")="giris_yapmis" then %>

<%
Set rsu = Server.CreateObject("Adodb.Recordset")
id = Session("id")
Sorgu = "Select * from uyeler where id= " & id
rsu.Open Sorgu, Baglanti, 1, 3
if rsu.eof then
Response.Write "<center>Üye bilgisi bulunmamaktadır!</center>"
else
%> <% end if %> <%else %>
<% end if %><br />
<input type="radio" name="kontrol_name" id="kontrol_name" value="<%=rsu("adi")%>" checked />
<label for="ad"><%=rsu("adi")%></label> </td>
</tr>
<tr>
<td>Son Kontrol Tarih Saat</td>
<td width="533"> <input name="isletme_ar_tarih" class="form-control" type="date" class="style99" id="isletme_ar_tarih" value=<%=Now()%> /></span></span></td></td>
</tr>
<tr>
<td colspan="2"><center><input name="kayittemizle2" type="reSet" class="btn btn-info" id="kayittemizle2" value="Temizle">
&nbsp;<input name="kayitekle2" type="submit" class="btn btn-info" id="kayitekle2" value="Kaydet"></td>
</tr>
</table>
<p>&nbsp;</div></form>
<%

Rs("isletme_veri")=trim(request.Form("isletme_veri"))
Rs("kontrol_name")=trim(request.Form("kontrol_name"))
Rs("arizanin_durumu")=trim(request.Form("arizanin_durumu"))

Rs("isletme_ar_tarih")=Now()

Rs.Update
Response.Write "<meta http-equiv='content-type' content='text-html; chaRset=winDows-1254'>"
Response.write "<script language='javascript'>alert('Değişiklikler kaydediliyor');</script>"
Response.write "<meta http-equiv='refresh' content='1; URL=xdefault.asp'>"

Response.End

%>
<%End Sub%>

 
Gönderildi : 13/10/2016 14:24

(@eravse)
Gönderiler: 1753
Üye
 

merhaba execute sonrası bır ıslem koyarsanız bunun onune gecersınz ornek

....

on error resume next
  conn.Execute sql
  if err<>0 then
    response.write("No update permissions!")
  else
    response.write("Record " & cid & " was updated!")
  end if

 

.....

ProfectSoft Yazılım ve Danışmanlık Hizmetleri
LogPusher & Bifyou E-Commerce System
www.profectsoft.com

 
Gönderildi : 14/10/2016 15:51

Paylaş: