SQL storage on network drive

Can somebody help me with a sample SQL lite to save / write or read data on the local folder of the pc for example c:\temp ?

I can handle the SQL command but i’m looking for the storage part.

also is the function deploy to local folder now removed in the new version 8.3.0.2 in the version 7.4.2.0 is it still there.

Thx forwarding

You can use an export to json / import to database. I have an example below that does not specify a path (easily fixed ?) but not sure what the proper process is for pasting or attaching code to these replies. Someone let me know if just inserting in the body of the reply as below is regarded as bad practice.

Thanks,
Jim

var startTime;

btnSQLExport.onclick = function() {
  var DB = SqlOpenDatabase("fixit.db");
  if(typeof(DB)=="undefined") {
    NSB.MsgBox("Database not found...");
 } else {
    NSB.ShowProgress("Exporting database...");
    DBjson=SQLExport(DB, "fixit.db" , exportComplete);
  }
};

function exportComplete() {
  NSB.ShowProgress(false);
  txtMessage.value=JSON.stringify(DBjson);
}

//<<<<<< Import <<<<<
btnSQLImport.onclick = function() {

startTime=SysInfo(10);

if(typeof(DBjson)=="undefined") {
    NSB.MsgBox("Use the SQLExport button to create a data to import");
 } else {
    SQLImport(DBjson, DB, importComplete);
  }
};

function importComplete(s) {
  console.log("importComplete() called. " + s);
 //refresh the selection
  sqlList= new Array(["SELECT * from repairsTbl ORDER BY locn_id;" , dataHandler]);
  Sql(DB, sqlList);
  txtMessage.value="Import completed.";
}

function dataHandler(transaction, results) {
 //Called On completion of Sql command
  DBRecords = results;
  txtMessage.value =  "Recs created: "  +  DBRecords.rows.length  +  " in "  +  (SysInfo(10)-startTime)  +  " milliseconds.";
}

Button3.onclick=function(){
function download(content, fileName, contentType) {
    var a = document.createElement("a");
    var file = new Blob([content], {type: contentType});
    a.href = URL.createObjectURL(file);
    a.download = fileName;
    a.click();
}
    var jsonData = JSON.stringify(DBjson);
    download(jsonData, 'json.txt', 'text/plain');
}

Whoops! didn’t mean to bold the sign-off…

Tip: If you’re pasting code, html or config files, surround it by triple back ticks (```) and it will be fomatted properly.

Thank you for the tip.

thx Jim i will try later today.

any update on the deploy to local folder? why it is removed in the new 8.x.x.x version?
Benoit

I’m not aware of any change which would turn off deploy to local folder for a regular license. Could you send me a copy of your About screen?

image
here it is in
in our new version on my tablet it is not possible

I registered a local copy of your account here on Version 8.3.0.2. Here is what the run menu looks like:

Screen Shot 2020-10-11 at 6.43.33 AM