|
-
Mar 3rd, 2001, 10:34 AM
#1
Thread Starter
New Member
Alright, I made a chat program, and it requires a text file, thats on my friends FTP server...It appends to the file, and the file is read for the chat window...Heres the code:
------------------------------------------------------------------------
Private Sub cmdSend_Click()
'"sends" the message
Dim FileNum As Integer
FileNum = FreeFile
Open "ftp://wp.dyndns.org/var/ftp/upload/murali/Chat.txt" For Append As FileNum
If txtMsg.Text = "" Then
lblErrormsg.Caption = "Insert a message before you hit send"
Close #FileNum
Else
Print #FileNum, Login; " >>"; " "; txtMsg.Text
txtMsg.Text = ""
Close #FileNum
End If
End Sub
------------------------------------------------------------------------
The open address is correct, when I type it in as a URL in a Web Browser, it works fine...Otherwise, won't work at all...Any suggestions?
-
Mar 3rd, 2001, 10:42 AM
#2
Ex-Super Mod'rater
I don't get what you mean?
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Mar 3rd, 2001, 10:45 AM
#3
Thread Starter
New Member
Oops
What I mean is, it gives me a File Not Found error whenever I run the program. It specifically highlights that line of code. I can run the program when the chat.txt is on my desktop, and it'll run fine, sending the message and reading it, and all that...But, when I changed the local address to the FTP address shown, it gives me a File Not Found error, and terminates the program. What I would like to know is, whats the problem...is it a wrong address or do I have to add more coding to it?
-
Mar 3rd, 2001, 10:49 AM
#4
Ex-Super Mod'rater
Notice that when you change the address i'm sure you need to disconnect (unless you mean change the address within the server)
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Mar 3rd, 2001, 10:49 AM
#5
Lively Member
Well...
I don't think you can open an FTP address like a normal file... You have to download it, edit it, and upload it...
-AndySoft
[email protected]
[email protected] (Use the other one first!)
I use: NASM, HTML, Perl, PHP, JavaScript, Batch, TI-Basic (TI-83+), QBasic 1.1, QuickBASIC 4.5, QuickBASIC Extended 7.1, VB-WIN 6 Ent., and the rest of Visual Studio 6 Ent.  And who knows what else!
-
Mar 3rd, 2001, 10:53 AM
#6
Ex-Super Mod'rater
Sorry, I didn't read though it all right. You can only use the Open statement with a file on your PC, not on interent.
Try looking for a FTP control and use that to download it then upload it when changes are made.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|