Reputation: 290
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
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:
Transfer the SQL command text as file to the FTP server
Run the remote command which executes the SQL command on the ms-access DB
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
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
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