Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
Chrisparr is currently offline  Chrisparr
Messages: 3
Registered: September 2016
Junior 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 Go to previous messageGo to next message
pfsdanny is currently offline  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 #48599 is a reply to message #48598] Fri, 04 August 2017 19:51 Go to previous messageGo to next message
Chrisparr is currently offline  Chrisparr
Messages: 3
Registered: September 2016
Junior Member
Hi,
Thank you very much for that. For other reasons I had stopped work on the project for which I needed this help. Fortuitously I have just started on it again so your help is much appreciated.

Regards,

Chris
Re: Ftp [message #48700 is a reply to message #48599] Fri, 25 August 2017 12:02 Go to previous message
pfsdanny is currently offline  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

Previous Topic: GridCtrl Cannot Resize Column
Next Topic: [SOLVED] Linking Ok, but .exe doesn't open
Goto Forum:
  


Current Time: Fri Oct 20 12:49:23 CEST 2017

Total time taken to generate the page: 0.01777 seconds