Skip to main content

AccessTr.neT


Access Dosya Güncelleme İnternetten

Access Dosya Güncelleme İnternetten

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

MetinVersiyon
https://drive.google.com/file/d/16UZBOYc...sp=sharing

guncelle
https://drive.google.com/file/d/167SvKRE...sp=sharing

guncel_yakit_hesapla
https://drive.google.com/file/d/1Igt-8Kp...sp=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

.rar yakit_hesapla_userx.rar (Dosya Boyutu: 197,59 KB | İndirme Sayısı: 2)
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Access Dosya Güncelleme İnternetten - Yazar: feraz - 01/03/2020, 14:57
Cvp: Access Dosya Güncelleme İnternetten - Yazar: feraz - 09/03/2020, 11:50
Task