Home » Community » Newbie corner » Ftp (Hi, I need to ftp an sqlite database up to and down from a website. Could you please provide an appropriate example)
Ftp [message #47388] |
Wed, 11 January 2017 15:11  |
Chrisparr
Messages: 7 Registered: September 2016
|
Promising Member |
|
|
Hi,
Sorry I did it in the topic description.
I need to ftp a small sqlite database up to a website so that someone with another program can download it from the website. Could you please provide code examples.
Thanks
|
|
|
Re: Ftp [message #48598 is a reply to message #47388] |
Fri, 04 August 2017 17:46   |
pfsdanny
Messages: 26 Registered: December 2011 Location: Hong Kong
|
Promising Member |
|
|
Hi,
As my knowledge sqlite is a single file base database engine. To upload the file to web server, you need to close all connection to the database. Then uses the plugin/ftp package to push your file to web server.
In IDE, select Project->Package organizer, Add plugin/ftp package to your package.
String data;
// read in your sqlite file to data
FtpClient ftp;
if (!ftp.connect(<webserverhostname/webserverip>, <ftpusername>, <ftppassword>, true, 10)) {
Exclamation("Connect error!");
return;
}
if (!ftp.Save(<thedestinationpath>, data) {
Exclamation("Save error!");
return;
}
ftp.Close();
|
|
|
|
Re: Ftp [message #48700 is a reply to message #48599] |
Fri, 25 August 2017 12:02  |
pfsdanny
Messages: 26 Registered: December 2011 Location: Hong Kong
|
Promising Member |
|
|
Hi,
Happy to hear that. I am not visit this forum frequently, if you still has any problem about ftp, pls reply to this post and sent me a private email that I can visit the forum and try my best to help.
Danny
|
|
|
Goto Forum:
Current Time: Tue Apr 29 13:48:03 CEST 2025
Total time taken to generate the page: 0.00808 seconds
|