Neuigkeiten:

Wenn ihr euch für eine gute Antwort bedanken möchtet, im entsprechenden Posting einfach den Knopf "sag Danke" drücken!

Mobiles Hauptmenü

Shortpathname... Dos Name ..

Begonnen von Ozziiee, September 17, 2013, 11:05:59

⏪ vorheriges - nächstes ⏩

Ozziiee

Mit der 32 Bit  Engine .. hatte ich die Möglichkeit ..Shortpathname und Longpathname zu generieren.. weiß jemand wie ich das Mit Access 2010 64 Bit Versionen wieder zum laufen bringe ?


Siehe Beispiel
Const MAXPATH                   As Long = 260

Type FILETIME
            dwLowDateTime       As Long
            dwHighDateTime      As Long
End Type

Type WIN32_FIND_DATA
            dwFileAttributes    As Long
            ftCreationTime      As FILETIME
            ftLastAccessTime    As FILETIME
            ftLastWriteTime     As FILETIME
            nFileSizeHigh       As Long
            nFileSizeLow        As Long
            dwReserved0         As Long
            dwReserved1         As Long
            cFileName           As String * MAXPATH
            cAlternate          As String * 14
End Type

Declare Function FindFirstFile Lib "kernel32" Alias _
                "FindFirstFileA" _
                (ByVal lpFileName As String, _
                 lpFindFileData As WIN32_FIND_DATA) As Long
Declare Function FindClose Lib "kernel32" _
                (ByVal hFindFile As Long) As Long
Declare Function GetShortPathName Lib "kernel32" Alias _
                "GetShortPathNameA" _
                (ByVal lpszLongPath As String, _
                 ByVal lpszShortPath As String, _
                 ByVal cchBuffer As Long) As Long

DF6GL

Viele Grüße vom Bodensee
Franz, DF6GL

Hilfestellung:  http://www.access-o-mania.de/forum/index.php?topic=6969.msg118738#msg118738

Links und Tipps:
1.   http://v.hdm-stuttgart.de/~riekert/lehre/db-kelz/
1a. http://www.tinohempel.de/info/info/datenbank/normalisierung.htm
1b. https://support.office.com/de-de/article/Grundlagen-des-Datenbankentwurfs-eb2159cf-1e30-401a-8084-bd4f9c9ca1f5#bmterms
2.   http://www.donkarl.com
3.   https://web.archive.org/web/20201201233522/http://www.dbwiki.net/
4.   http://www.access-tutorial.de/
5.   http://www.tty1.net/smart-questions_de.htm
6.   http://access.joposol.com/accept

Last but not least:   < F1 > für Hilfe
;) Learning by doing not by spoon-feed ;)

Tipp: Find and Replace for Access

Ozziiee

Erst mal danke .. für den Tip .. hab aber noch ein Problem bei der Umsetzung ..

hab mal das Bespiel hier ausgeführt ..

Option Compare Database
Const MAXPATH                   As Long = 260

Type FILETIME
            dwLowDateTime       As Long
            dwHighDateTime      As Long
End Type

Type WIN32_FIND_DATA
            dwFileAttributes    As Long
            ftCreationTime      As FILETIME
            ftLastAccessTime    As FILETIME
            ftLastWriteTime     As FILETIME
            nFileSizeHigh       As Long
            nFileSizeLow        As Long
            dwReserved0         As Long
            dwReserved1         As Long
            cFileName           As String * MAXPATH
            cAlternate          As String * 14
End Type

Declare PtrSafe Function Getshortpathname Lib "kernel32" Alias _
                "GetShortPathNameA" _
                (ByVal lpszLongPath As String, _
                 ByVal lpszShortPath As String, _
                 ByVal cchBuffer As Long) As Long

Function GetShortPath(ByVal sLongPath As String) As String
'// -----------------------------------------------------------------
'// Methode:   | Ermittelt den 8.3 (DOS)-Pfad
'// -----------------------------------------------------------------
'// Parameter: | sLongPath = gültiger Datei- oder Ordnerpfad
'// -----------------------------------------------------------------
'// Rückgabe:  | 8.3 (DOS)-Pfad
'// -----------------------------------------------------------------
    Dim sShortPath  As String
    sShortPath = VBA.String(260, 0)
    If Getshortpathname(sLongPath, sShortPath, Len(sShortPath)) Then
        GetShortPath = _
        VBA.Left(sShortPath, VBA.InStr(sShortPath, vbNullChar) - 1)
    End If

End Function

Sub Beispiel()

    Dim sLongPath   As String
    Dim sShortPath  As String

    sLongPath = "C:\Programme\Microsoft Office\Office10\WINWORD.EXE"
    sShortPath = GetShortPath(sLongPath)
    MsgBox "Der kurze Pfad lautet: " & sShortPath
     
End Sub


bekomme aber keinen Wert zurück, vielleicht kannst ju ja mal rüberschaun .. thxs Ozziie alias db4rn