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)
Re: Ftp [message #48598 is a reply to message #47388] Fri, 04 August 2017 17:46 Go to previous messageGo to previous 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();

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


Current Time: Tue May 07 09:37:29 CEST 2024

Total time taken to generate the page: 0.02271 seconds