Accessing MySQL tables using FTP

stallyon

Registered User.
Local time
Today, 00:28
Joined
Feb 8, 2007
Messages
37
Hi,

Just a quick question. I was asked if it was possible to append data to MySQL tables in VB using an open FTP connection. I said I was 99% sure there is no way of doing it but thought I'd ask to see if anyone else has actually tried it?

:(
 
FTP is for file transfers, not SQL updates... I would say no. Unless you did some tricky coding to upload a SQL file to the server via FTP, then have the server poll the directory and process the SQlL
 
Treason is right... it is difficult but it can be done.

Create some code that runs ftp through bat executable files.

Your bat file would have something like:
ftp -s:c:\temp\FTPc2s.txt <ip address>

Your FTPc2s.txt file would contain:
<username>
<userpassword>
hash on
ascii on
verbose
put c:\temp\filename.txt /serverdirectory/filename.txt

You can update both of these files through access and update them as necessary.

output file from access
run code to open the bat file at a certain time of the day.
This ftp's the file for the update to your server.

Then schedule (through CRON) a unix script to run a sqlloader script at a time after the ftp process has finished.

Complicated but possible.
 

Users who are viewing this thread

Back
Top Bottom