Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49177

How to get data from web services in my SQLite insert field ...i want help because today is my project dad line date

$
0
0

@ashishionic23 wrote:

how to get data from web services in my SQLite insert field .
i have 29 field in my json and i am using asp.net web serveces
my database table is this. ->

document.addEventListener('deviceready', function() {
db = $cordovaSQLite.openDB("my.db");

  $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS my.db (id integer primary key,AMPS,Application,CLAWS,DriveOD,HEIGHTOFSTACK,KW,Length,OAL,Rotation,RotationDrive,RotationMoter,SEGMENTS,SPLINE,TERMINALS,Teeth,TeethID,TeethOD,VOLT,brand,catid,cattitle,coil,oemno,oemtitle,prodcode,prodcode1,prodid,status,uploadImage)");
  console.log(db);

});

  var execute = function() {
  var query = "INSERT INTO my.db (AMPS,Application,CLAWS,DriveOD,HEIGHTOFSTACK, KW,Length,OAL,Rotation,RotationDrive,RotationMoter,SEGMENTS,SPLINE, TERMINALS,Teeth,TeethID,TeethOD,VOLT,brand,catid,cattitle,coil,oemno,oemtitle,prodcode,prodcode1,prodid,status,uploadImage) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  $cordovaSQLite.execute(db, query, ["AMPS", "Application", "CLAWS", "DriveOD", "HEIGHTOFSTACK", "KW", "Length", "OAL", "Rotation", "RotationDrive", "RotationMoter", "SEGMENTS", "SPLINE", "TERMINALS", "Teeth", "TeethID", "TeethOD", "VOLT", "brand", "catid", "cattitle", "coil", "oemno", "oemtitle", "prodcode", "prodcode1", "prodid", "status", "uploadImage"]).then(function(res) {
  console.log("insertId: " + res.insertId);
  }, function (err) {
    console.error(err);
  });

};

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>