Avatar billede jensen363 Forsker
27. marts 2006 - 10:50 Der er 13 kommentarer og
1 løsning

MyValue / FTP eksport problemer

Function Vejstykke()
Dim Message, Title, Default, MyValue
Dim StartFolder As String

Message = "Hvor skal datafilerne placeres ?"    ' Set prompt.
Title = "Eksportfilstruktur"    ' Set title.

Default = "C:\"    ' Set default.

StartFolder = DLookup("[ImportFil]", "tblFilplacering", "[JobID]=3")

MyValue = InputBox(Message, Title, Default)

    'Ulige husnumre
    DoCmd.TransferText acExportDelim, "Vejstykke1 Eksportspecifikation", "Vejstykke1", MyValue & "Vejstykke1.txt", False, ""
    ' Lige husnumre
    DoCmd.TransferText acExportDelim, "Vejstykke1 Eksportspecifikation", "Vejstykke2", MyValue & "Vejstykke2.txt", False, ""

        'Hent Cooprute-tabelfil ved samme lejlighed
        FileCopy StartFolder & "COOPrutestykke.txt", MyValue & "COOPrutestykke.txt"

End Function
Avatar billede jensen363 Forsker
27. marts 2006 - 10:54 #1
Hvad gå galt i ovenstående ?

Der er tale om eksport til en FTP-server ( MyValue ), og StartFolder kan den godt identificere, ligesom MyValue også returneres korrekt ... bortset fra den sidste

FileCopy StartFolder & "COOPrutestykke.txt", MyValue & "COOPrutestykke.txt"

der kan den ikke aflæse MyValue
Avatar billede terry Ekspert
27. marts 2006 - 11:10 #2
Hi jensen363
You say "Der er tale om eksport til en FTP-server ....". Dont you still mean a file server which you have access to? If it is an FTP server then shouldnt you be using FTP to upload?
Avatar billede jensen363 Forsker
27. marts 2006 - 11:15 #3
MyValue is the FTP-adress where I place my files
Avatar billede terry Ekspert
27. marts 2006 - 11:19 #4
I've never used DoCmd.TransferText with an FTP site and I wouldnt have thought it possible. To use an FTP site you normally use FTP, not just copy.

Can you give an example of MyValue?

How would you normally copy a file to the site in Windows?
Avatar billede terry Ekspert
27. marts 2006 - 11:25 #5
Avatar billede jensen363 Forsker
27. marts 2006 - 11:30 #6
DoCmd.TransferText works perfectly, it´s the FileCopy syntax that fails.

MyValue : ftp://193.3.69.36/userdirs/uskxrlu2qqi7q5fodofhyqplwvcq6c8hjt7/
Avatar billede terry Ekspert
27. marts 2006 - 11:39 #7
I'm surprised if TransferText works against an FTP site.

I'm not surprised that FileCopy doesnt.
Avatar billede jensen363 Forsker
27. marts 2006 - 11:40 #8
Solution ?
Avatar billede terry Ekspert
27. marts 2006 - 11:45 #9
27/03-2006 11:25:19
Avatar billede jensen363 Forsker
28. marts 2006 - 09:11 #10
Terry > Because the TransferText works perfectly, I´ve made a solution where I import the last/missing txt-file to Access and then export it with the other two files
Avatar billede terry Ekspert
28. marts 2006 - 10:17 #11
Yes that was a solution too, whichI had also concidered, but as I didnt know what data the file contained I didnt suggest it.
Avatar billede jensen363 Forsker
28. marts 2006 - 10:37 #12
No problemo :o) ... place an answer
Avatar billede terry Ekspert
28. marts 2006 - 14:07 #13
You should keep them yourself, after all you found the solution :o)
Avatar billede jensen363 Forsker
28. marts 2006 - 22:28 #14
Ok :o)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester