Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Function BinExport(tabelle As String, PfadDatei As String, BinaryFeld As String, IDNr As Long)
' Ein OLE-Object eines Tabellenfeldes in eine Datei exportieren
'Autor: Günther Ritter www.ostfrieslandweb.de
' tabelle = Tabellenname
' PfadDatei = Dateiname incl. Pfad
' BinaryFeld = Name des OLE-Object Feldes
' IDNr = ID-Nummer des Datensatzes der Tabelle
'Achtung, absolute Feldnamen: ID
'Aufbau der Tabelle tblPicture:
'-----------------------------
'ID - Autowert
'BytesAnz - Zahl / Long Integer
'DateiName - Memo
'Kurztext - Text 100
'LangText - Memo
'Picture - OLE-Object
Dim DB As DATABASE, rs As Recordset, I As Long, Nr As Long, BinaryData() As Byte
Set DB = CurrentDb
Set rs = DB.OpenRecordset("select " & BinaryFeld & " from " & tabelle & " where id=" & IDNr)
Nr = FreeFile
Open PfadDatei For Binary As #Nr
rs.MoveFirst
ReDim BinaryData(rs(BinaryFeld).FieldSize)
BinaryData() = rs(BinaryFeld).GetChunk(0, rs(BinaryFeld).FieldSize)
Put #Nr, , BinaryData()
Close #Nr
Erase BinaryData
rs.Close
DB.Close
Set rs = Nothing
Set DB = Nothing
End Function