Transfer file between client and server using using MIDAS/COM

Transfer file between client and server using using MIDAS/COM

Post by Lee Morri » Sun, 23 Sep 2007 12:09:26


I have built several 3TC/S applications using TRemoteDataModules,
providers, client datasets etc. All with great success. However, now
I want to transfer files between the client and server. I need to do
both upload and download. I found the article:

http://www.yqcomputer.com/

The "Sending a file you do not want to display" section is exactly what
I want. (However I think the demo is for upload only).

- I need the demo app. I have Delphi 7 Enterprise, and have checked
through my demo apps, and I don't have this demo. Is there a freely
available demo I can get that covers upload download using MIDAS/COM
client/server?

The idea being.. let's say I have an .xls file on my local PC. I want
to copy it up to a folder on a server, via the MIDAS/COM server my
client is connected to. Then, maybe the next day, I would like another
user, perhaps on the other side of the planet, to be able to download
the .xls file from the server hard drive, onto their local PC hard
drive.

Thanks in advance

--
 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Marc Rohlo » Sun, 23 Sep 2007 14:00:52


This is not a demo that comes with Delphi. Bill basically walks you
through the steps you need to take and provides all the code right
there in the article.
Where exactly do you need help?

--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com

 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Bill Tod » Sun, 23 Sep 2007 23:45:35

That article is actually a BorCon paper that I gave at the time Delphi
3 was released. IIRC there used to be a link to download the code at
the bottom of the paper but that seems to have disappeared. You should
be able to copy the code from the HTML page and paste it into a Delphi
app.

--
Bill Todd (TeamB)
 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Lee Morri » Mon, 24 Sep 2007 23:41:43

Hi Marc,

Now that I actually take the time the *read* the article, I see that it
is very well written and detailed enough for me to accomplish my task.

Just one question... From within the Remote Data Module, I want it to
close itself. (Special circumstances I won't get into at the moment).

In the article, the example uses a TRemoteDataModule in a DLL. My
other projects use a TRemoteDataModule in an .Exe. If I try to close
the .Exe when there are clients attached, a rather large warning dialog
popus up telling me that there are clients attached, and asks if I want
to proceed with closing.

I need to follow the TRemoteDataModule in a DLL example as described in
the article, however I need it to be able to:

A) Close itself
--
 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Lee Morri » Mon, 24 Sep 2007 23:43:56


A) Close itself
B) Return the memory it uses to the OS.

Can I just use something like Application.Terminate?
However, in a DLL, is there a TApplication component?

(Sorry for the split message. Skype versus XanaNews key combo conflict)


--
 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Lee Morri » Mon, 24 Sep 2007 23:45:56

(Oh ya, and I don't want a big warning dialog to appear that needs some
one to click "OK" on to make it close and return it's memory to the OS)

Thanks Marc, and Bill!


--
 
 
 

Transfer file between client and server using using MIDAS/COM

Post by Marc Rohlo » Tue, 25 Sep 2007 23:25:08


I don't know the answers to this but you might find it better to start
a new thread for a new question. A lot more people will notice it that
way.

--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com