08-01-2001, 11:05 PM
How to pass file (.txt or any othet) as a parameter in vb .
suppose function f1 and f2 and i want to pass a file from f1 to f2.
08-02-2001, 07:02 AM
What do you mean by saying "passing a file?"
If it means passing a file name, pass its name.
If it means passing a file's content, open it and read all its content in a String variable
then pass the string variable.
The point is that you need to have a clear idea of what you want.
The second thing you want to consider is that a function can
accept many parameters, but it can only return a single value.
It returns its value to the command that calls it. It in turn can
call itself or many other functions. In the command that calls other
functions or the function itself, it may pass parameters. In this
we do not say that the function F1 pass parameter to the function
F2. The correct concept is that a command calls a function, and
a calling command passes parameters to a function.
08-06-2001, 01:29 AM
Thanks a lot.
Actually the content of file is very large.it's not possible to store in a string and pass the string as a parameter.I want the content of file should be pass just giving the file name as a parameter.I think it's not possible but still ....
Actually my requirement is to upload data from client machine to internet server using vb only.
if there any other soltion pls reply.
08-06-2001, 07:38 AM
It is impossible to do this using VB only because the server has to have some program to receive the file. The two most used file transfer protocols are HTTP and FTP. Both can be controlled from VB but I think the FTP will be the easier of the two. Does the internet server support FTP file transfer?
I think therefore I am... sometimes right. images/icons/wink.gif