-

   rss_sql_ru_access_programming

 - e-mail

 

 -

 LiveInternet.ru:
: 16.03.2006
:
:
: 4

:


""

, 29 2014 . 13:08 +
!

:
Public Function ExportAttachment() As String
Dim i As Integer
Dim f
Dim path
Dim fil
Dim filp
Dim filK
f = Forms!frm_mail!attach.FileName
If f = "" Then GoTo ex
path = "C:\SedMO\TEMP\OutPut\dfiles\"
fil = Dir(path)
filp = path & fil
If f = fil Then Kill (filp)
Dim strSQL As String
 i = Forms!frm_mail!ID_mail
strSQL = "SELECT * FROM [td_mail] WHERE [id_mail] =  " & i
 
Dim strFilePath As String
Dim db As DAO.Database
Dim rsParent As DAO.Recordset2
Dim rsChild As DAO.Recordset2
 
Set db = CurrentDb
 
Set rsParent = db.OpenRecordset(strSQL)
 
rsParent.Edit
Set rsChild = rsParent.Fields("attach").Value
 
      rsChild.Fields("FileData").SaveToFile "C:\SedMO\TEMP\OutPut\dfiles\"
    ExportAttachment = rsChild.Fields("FileName")
    
ex:
Exit Function
End Function


, .
?
!

http://www.sql.ru/forum/1091943/izvlichenie-faylov-iz-polya-vlozhenie-programmnym-putem


: [1] []
 

:
: 

: ( )

:

  URL