OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

connect to a server with username/password

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
flex
OOo Enthusiast
OOo Enthusiast


Joined: 06 Jul 2004
Posts: 122
Location: Vienna | Austria

PostPosted: Fri Jun 03, 2005 6:45 am    Post subject: connect to a server with username/password Reply with quote

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
View user's profile Send private message
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Sat Jun 04, 2005 5:37 am    Post subject: Reply with quote

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
View user's profile Send private message
flex
OOo Enthusiast
OOo Enthusiast


Joined: 06 Jul 2004
Posts: 122
Location: Vienna | Austria

PostPosted: Fri Jun 10, 2005 6:19 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group