Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

92
Views
React Native Expo | Download database from external url

im creating a React Native application using Expo platform. I have SQLite database connected to be able to work with app without internet connection. Here is my code: (you can use my github link to test program)

downloadDB = () => {
    let fileUri = `${FileSystem.documentDirectory}SQLite/qr.db`; //The place I download my .db file to
    const uri = "https://github.com/iliapnmrv/iliapnmrv.github.io/blob/02dfac2080ec9d7efdc0f131abfb52de36f88c2d/inventory/qr.db" // An external link
    FileSystem.downloadAsync(uri, fileUri) 
    .then(({ uri, status }) => {
      console.log(`Download status: ${status}`) // code always displays status code 200
      db.transaction(
        tx => {
          tx.executeSql(
            'SELECT * FROM qr', 
            [], 
            (_, result) => {
              console.log(`QR table has ${result.rows.lengs} rows`)
            },
            (_, error) => {
              console.log(`Error code 1: ${error}`)
            }
        );
        }
      );
    })
    .catch(err => {
      console.error(`Error code 7: ${err}`);
    });
  }

And here are all consoles, app returns:

Download status: 200
Error code 1: Error: no such table: qr (code 1 SQLITE_ERROR[1]): , while compiling: SELECT * FROM qr

Please help me solve this problem.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!