AccessTr.neT
Access Dosya Güncelleme İnternetten - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: Microsoft Access (https://accesstr.net/forum-microsoft-access.html)
+--- Forum: Access Cevaplanmış Soruları (https://accesstr.net/forum-access-cevaplanmis-sorulari.html)
+--- Konu Başlığı: Access Dosya Güncelleme İnternetten (/konu-access-dosya-guncelleme-internetten.html)

Sayfalar: 1 2 3 4 5 6 7 8 9 10 11 12 13


Cvp: Access Dosya Güncelleme İnternetten - ozanakkaya - 09/03/2020

Google drive'a 1.6 olan dosya eklediğinizde, dosyanın indirme linki değişiyor olabilir.
Ayrıca, frm_hesapla isimli formda, VersiyonNedir kodunda

DeleteUrlCacheEntry GYeniSurum
DeleteUrlCacheEntry GGuncelleDosyasi

Şeklinde kod var mı?


Cvp: Access Dosya Güncelleme İnternetten - feraz - 09/03/2020

Usex hocanın 31.Mesajdaki dosyayı kullanıyorum Driver için.

MetinVersiyon
https://drive.google.com/file/d/16UZBOYcA7t73ie36KZyg-amLfJesWPL9/view?usp=sharing

guncelle
https://drive.google.com/file/d/167SvKREzre-2lj4CDzZX7LO0xyE_cynN/view?usp=sharing

guncel_yakit_hesapla
https://drive.google.com/file/d/1Igt-8Kp2zXChcJPmOz6gxNIeJQCAru7d/view?usp=sharing


Driver güncel linklerde yukarıda.

Kod:
FormatVersiyon = ".accdb"
Yukarıdaki gibi değişkene atamıştım her yerde  .accdb yazmamak için.




Metinversiyon dropboxtan alınıyor ordan driverden yapılamadı.
Kodlar altta.


Kod:
Public Sub VersiyonNedir()

Dim FormatVersiyon As String
Dim versiyon_adresi As String
Dim IEb As Object
Dim temp As String
Dim GVersiyon, GGuncelleDosyasi, GYeniSurum As String
Dim sim_major_vers, sim_midi_vers, sim_minor_vers, gun_major_vers, gun_midi_vers, gun_minor_vers As Byte

FormatVersiyon = ".accdb"

GYeniSurum = "https://drive.google.com/uc?export=download&id=1XIjn4tO3ZLvlnLyVyFmj4IZrzkUcOQqP"
GGuncelleDosyasi = "https://drive.google.com/uc?export=download&id=1-OuiulVQYKeei2XE0e_asEPjsYWQE4Wy"

DeleteUrlCacheEntry GYeniSurum
DeleteUrlCacheEntry GGuncelleDosyasi
   
If Len(Dir(CurrentProject.Path & "\guncelle" & FormatVersiyon)) > 0 Then

Kill CurrentProject.Path & "\guncelle" & FormatVersiyon

End If

  versiyon_adresi = "https://dl.dropboxusercontent.com/s/rwi9kgon5qbyw8p/progver.txt"

    Set IEb = CreateObject("InternetExplorer.Application")
        With IEb
            .Navigate versiyon_adresi
            Do Until IEb.ReadyState = 4
                DoEvents
            Loop
           
                temp = IEb.Document.All.Item.innertext
        End With
       
         
            lbl_programin_versiyonu.Caption = Nz(DLookup("program_versiyonu", "tbl_program_ayarlari"), "0.0.00")
           
           
    Set IEb = Nothing
   
    GVersiyon = Mid$(temp, InStr(temp, ":") + 1, 6)
   


    sim_major_vers = Mid$(lbl_programin_versiyonu.Caption, 1, 1)
    sim_midi_vers = Mid$(lbl_programin_versiyonu.Caption, 3, 1)
    sim_minor_vers = Mid$(lbl_programin_versiyonu.Caption, 5, 2)
   
    gun_major_vers = Mid$(GVersiyon, 1, 1)
    gun_midi_vers = Mid$(GVersiyon, 3, 1)
    gun_minor_vers = Mid$(GVersiyon, 5, 2)
   
    If IsNull(gun_major_vers) And IsNull(gun_midi_vers) And IsNull(gun_minor_vers) Then
   
    Exit Sub
    End If
   
    lbl_guncel_versiyon.Caption = GVersiyon
   
    If gun_major_vers > sim_major_vers Then
   
        lbl_guncel_versiyon.ForeColor = RGB(255, 0, 0)
       
        If MsgBox("A Kullandýðýnýz programdan daha yeni bir versiyon bulunmaktadýr." & vbCrLf & vbCrLf & "Yeni versiyonu indirmek istiyor musunuz?", vbExclamation + vbYesNo, "Yeni Sürüm Mevcut") = vbYes Then
       
           
            URLDownloadToFile 0, GYeniSurum, CurrentProject.Path & "\guncel_yakit_hesapla" & FormatVersiyon, 0, 0
            URLDownloadToFile 0, GGuncelleDosyasi, CurrentProject.Path & "\guncelle" & FormatVersiyon, 0, 0
           
        End If
       
    ElseIf gun_midi_vers > sim_midi_vers Then
   
        lbl_guncel_versiyon.ForeColor = RGB(255, 0, 0)
       
        If MsgBox("B Kullandýðýnýz programdan daha yeni bir versiyon bulunmaktadýr." & vbCrLf & vbCrLf & "Yeni versiyonu indirmek istiyor musunuz?", vbExclamation + vbYesNo, "Yeni Sürüm Mevcut") = vbYes Then
       
            URLDownloadToFile 0, GYeniSurum, CurrentProject.Path & "\guncel_yakit_hesapla" & FormatVersiyon, 0, 0
            URLDownloadToFile 0, GGuncelleDosyasi, CurrentProject.Path & "\guncelle" & FormatVersiyon, 0, 0
           
        End If
       
    ElseIf gun_minor_vers > sim_minor_vers Then
   
        lbl_guncel_versiyon.ForeColor = RGB(255, 0, 0)
       
        If MsgBox("C Kullandýðýnýz programdan daha yeni bir versiyon bulunmaktadýr." & vbCrLf & vbCrLf & "Yeni versiyonu indirmek istiyor musunuz?", vbExclamation + vbYesNo, "Yeni Sürüm Mevcut") = vbYes Then
       
            URLDownloadToFile 0, GYeniSurum, CurrentProject.Path & "\guncel_yakit_hesapla" & FormatVersiyon, 0, 0
            URLDownloadToFile 0, GGuncelleDosyasi, CurrentProject.Path & "\guncelle" & FormatVersiyon, 0, 0
           
           
            Dim accapp As Access.Application

            Set accapp = New Access.Application

          accapp.OpenCurrentDatabase CurrentProject.Path & "\guncelle" & FormatVersiyon
          'accapp.Visible = True
           
          Application.Quit
           
           
           
        End If
       
    Else
   
        'MsgBox "Þu anda en son güncel versiyonu kullanýyorsunuz", vbInformation + vbOKOnly, ProgramAdi
        lbl_guncel_versiyon.ForeColor = RGB(0, 0, 0)
   
    End If
       
   
End Sub




Cvp: Access Dosya Güncelleme İnternetten - ozanakkaya - 09/03/2020

Merhaba, eklediğiniz son dosyada herhangi bir sorun görünmüyor.


Cvp: Access Dosya Güncelleme İnternetten - userx - 09/03/2020

Sayın feraz drive google 'a yüklediğiniz güncel_yakit_hesapla dosyasındaki versiyonu eski olanı mı yüklüyorsunuz acaba ? Benim örneğimde olduğu gibi herhangi bir sorun çıkmıyor. Sadece versiyon kontrolü yapılan metin dosyası drive google'da okunmuyor. 


Cvp: Access Dosya Güncelleme İnternetten - feraz - 09/03/2020

Birde son linklere göre deneyeyim aceleden deneyemedim linkleri almıştım yeniden.


Cvp: Access Dosya Güncelleme İnternetten - userx - 09/03/2020

Bence elinizdeki eski indirdiğiniz örnekleri silip bir tane örnek bırakmanız en iyisi.