Python Forum
Write SQLite query result to file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Write SQLite query result to file
I need to write a SQLite query result in a file:

c.execute("SELECT * FROM mytable ORDER BY date(Date) ASC LIMIT 1;")

but I get this error:

TypeError: argument 1 must be string or read-only character buffer, not None

how can I solve this?
Have a look at these links
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
Gaming Collection

Possibly Related Threads…
Thread Author Replies Views Last Post
  write mariadb table rows query to each file? shams 1 277 Feb-02-2021, 04:10 PM
Last Post: buran
  Read/Write binary file deanhystad 3 413 Feb-01-2021, 10:29 AM
Last Post: Larz60+
  Running A Parser In VSCode - And Write The Results Into A Csv-File apollo 5 636 Jan-14-2021, 08:58 PM
Last Post: snippsat
  How do I write a single 8-bit byte to a file? MysticLord 2 641 Sep-03-2020, 12:27 PM
Last Post: MysticLord
  unable to write to log file Mekala 2 587 Aug-12-2020, 11:02 PM
Last Post: Mekala
  List Won't Write in Text File IILawrenceII 4 641 Jul-17-2020, 11:16 PM
Last Post: j.crater
  Importing data from a text file into an SQLite database with Python macieju1974 7 943 Jun-29-2020, 08:51 PM
Last Post: buran
  Process Data from one csv file and write to another CSV file specific column ajin9581 1 610 Jun-17-2020, 06:00 PM
Last Post: buran
  Append JSON's and write to file faqsap 4 971 May-15-2020, 04:20 PM
Last Post: faqsap
  Print/write to file function tpolim008 4 858 Apr-01-2020, 07:59 PM
Last Post: tpolim008

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020