Chris McKenna6917608
Posts: 0
Joined: Sat Jun 07, 2014 2:12 am

Looking for server code example for db query to csv file saved and uploaded back to db.

Does anyone have an example that would help me create server code that create a csv file from database query, and store the file back into the database.

In a second step, i also want to email either a link or the actual file using SendGrid.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Looking for server code example for db query to csv file saved and uploaded back to db.

Hi Chris,

Please clarify you want to upload back using the Appery.io Database?

Chris McKenna6917608
Posts: 0
Joined: Sat Jun 07, 2014 2:12 am

Looking for server code example for db query to csv file saved and uploaded back to db.

I have a form that collects data and stores in the db. I want to run some server code once a day that runs a query to pull only the new entries for the past 24 hours and creates a CSV file.

Saving the CSV file into the DB is really not necessary thinking about it more.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Looking for server code example for db query to csv file saved and uploaded back to db.

Hello Chris,

We have some tutorials with using server code: http://devcenter.appery.io/tutorials/...
And comprehensive documentation about server code: http://devcenter.appery.io/documentat...

Chris McKenna6917608
Posts: 0
Joined: Sat Jun 07, 2014 2:12 am

Looking for server code example for db query to csv file saved and uploaded back to db.

I have been through those..while they are very helpful, they don't answer the questions i have.

I am trying to query the db for records enter on a given date and then format the results in to a CSV file and email those ..

I have examples of:

Doing the query I want
Emailing text to someone using sendgrid

I am missing:
Saving the content from the query to a file in csv format
then Emailing that file.

After typing this.. I realized something. To do the emailing, have to use something like sendgrid, so for the file save part do i need a 3rd party as well ? Like box or Dropbox to store the data as a file to them package up into a email. At that point. I can just share the link of the dropbox file in a email i guess and not worry about actually shipping the file.

Or is there some way in js to create the CSV file and attach it to an email with out ever actually creating the file to disk?

I found a entry on stackoverflow that shows how to do it in python.. so I assume there is some why i could do similar in js.

Thanks in advance for any additional help.

Return to “Issues”