Rahul Pol
Rahul Pol

Reputation: 290

Can I remotely run an ACCESS query on a DB located on an FTP server?

I want to run a sql query on ms-access database that is located at ftp server and get only the result back of that query in my application written in c#. Is it possible?

Upvotes: 2

Views: 611

Answers (3)

Axel Kemper
Axel Kemper

Reputation: 11322

You could use the FTP command quote or literal to execute a program (or VBS script) on the FTP server machine.

Your "solution" could work as follows:

  1. Transfer the SQL command text as file to the FTP server

  2. Run the remote command which executes the SQL command on the ms-access DB

  3. Transfer the result of step 2. back to your local machine

As mentioned before, this szenario is unreliable, slow, unsecure, needs error handling, ...

Upvotes: 0

Preet Sangha
Preet Sangha

Reputation: 65506

No. JET must be able to open the file via a standard SMB or local location.

See if you can map the FTP location to an SMB type share using some tool first perhaps. Or copy the file locally.

Edit: A possible workaround (based on @baconsah's answer)

You could actually improve the @baconsah's design, by writing a file to the FTP server. Then have a process on the remote server that picks up the write and which then does the query at that point and making the the results available on the FTP output. You lose the latency but increase the complexity.

Upvotes: 1

BaconSah
BaconSah

Reputation: 421

A horrible alternative is having an access database run the query on the remote system, on a timed job basis, and output the results to a file in that ftp directory.

Upvotes: 0

Related Questions