| View previous topic :: View next topic |
| Author |
Message |
flex OOo Enthusiast


Joined: 06 Jul 2004 Posts: 122 Location: Vienna | Austria
|
Posted: Fri Jun 03, 2005 6:45 am Post subject: connect to a server with username/password |
|
|
I'd like to save a file with this code:
| Code: | | Open \\server\folder\file For Append As #FileNum |
For connecting to \\server I need to enter a username and a password first. Is it possible to connect to this server before I save the file?
(If I do not connect before I can not write the file [E/A-Error]) |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Sat Jun 04, 2005 5:37 am Post subject: |
|
|
the URL notation of filenames allows for specification of username and password, e.g. | Code: | ftp://name:password@somewhere.com/some/path/MyDocument.sxw
|
so you can convert your filename to an URL, using BASIC ConvertToUrl: | Code: | | file://server/folder/file | ...add your user/passwd | Code: | | file://name:password@server/folder/file |
I am not sure if the Open function takes URLs, if not, use the SimpleFileAccess methods
good luck,
ms777 |
|
| Back to top |
|
 |
flex OOo Enthusiast


Joined: 06 Jul 2004 Posts: 122 Location: Vienna | Austria
|
Posted: Fri Jun 10, 2005 6:19 am Post subject: |
|
|
sorry, ms777, but your idea does not work. I will try to do that with the SimpleFileAccess. But I have not found the right commands for opening a networkconnection yet.
regards Flex |
|
| Back to top |
|
 |
|