(30/08/2015, 19:07)ozanakkaya yazdı: Veritabanı Yedekleme ve Bakım Uygulaması V3 örneğini inceleyiniz.
sayın ozanakkaya cevabınız ve göstermiş olduğunuz örnek için teşekkür ederim
uygulamayı kompile değilde sadece yedekleme komutunu almak istiyorum
kendi oluşturmuş olduğum komutun tıklama yordamına bu kodu eklesem yeterli olur mu ?
Kod:
Public Function CopyFile(strSource As String, strDestination As String) As Boolean
Const BufferSize = 4096
Dim strBuffer As String * BufferSize
Dim strTempBuffer As String
Dim intSourceFile As Integer
Dim intDestinationFile As Integer
Dim lngCounter As Long
On Error GoTo PROC_ERR
intSourceFile = FreeFile
Open strSource For Binary As #intSourceFile
intDestinationFile = FreeFile
Open strDestination For Binary As #intDestinationFile
For lngCounter = 1 To LOF(intSourceFile) \ BufferSize
Get #intSourceFile, , strBuffer
Put #intDestinationFile, , strBuffer
Next lngCounter
lngCounter = LOF(intSourceFile) Mod BufferSize
If lngCounter > 0 Then
Get #intSourceFile, , strBuffer
strTempBuffer = Left$(strBuffer, lngCounter)
Put #intDestinationFile, , strTempBuffer
End If
Close #intSourceFile
Close #intDestinationFile
CopyFile = True
PROC_EXIT:
Exit Function
PROC_ERR:
CopyFile = False
Resume PROC_EXIT
End Function