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

218
Views
¿Cómo insertar múltiples datos en SqlLite con reaccionar nativo?

Intenté insertar varios datos en mi tabla sqlLite, pero no funciona según lo previsto.

Esta es mi función Create :

 function Create() { console.log("DBITEMS CREATED") db.transaction(tx => { tx.executeSql("CREATE TABLE IF NOT EXISTS DBITEMS(ID INTEGER PRIMARY KEY NOT NULL, DATE TEXT, HEURE TEXT, MINUTES TEXT)") }); }

Esta es mi función Insert :

 function Insert(date) { let d = new Date(date) console.log('\nDATE:',date) var dString = d.toISOString().split('T')[0].toString() let heure = d.getHours().toString() let minutes = d.getMinutes().toString() db.transaction(tx => { tx.executeSql("INSERT INTO DBITEMS(DATE,HEURE,MINUTES) VALUES(?,?,?)", [dString,heure,minutes],(tx,result)=>{ if (result.rows.length > 0) { console.log('Data Inserted Successfully...',date) } else console.log('Failed...') }) }) }

Esta es la salida de la consola:

 DATE: 2022-03-15T16:35:36.626Z
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!