Insert to sql server

I write in angular, I  bring 4 number from sql server, it is ok,
I want to insert the number to table in sql server, and I can not succed.
I appreciate help.
in file enter-kria.component.ts
this.kriotsService.insertKria(this.systemsID, this.subSystemID, this.kindKriaID, this.priorityID);

in file  kriots.service.ts
insertKria(systemsID: number, subSystemID: number, kindKriaID: number, priorityID: number) {
    const post: Post = { systemsID: systemsID, subSystemID: subSystemID, kindKriaID: kindKriaID, priorityID: priorityID };
      .put<{ TSK_ID: number }>(
     // .subscribe(TSK_ID => {
     // this.Tsk_Id = TSK_ID;
//    });
in file  kriots.js
router.put('/insert', function (req, res) {
    const post = new Post({
        TSK_SYS_ID: req.body.TSK_SYS_ID,
        TSK_SUS_ID: req.body.TSK_SUS_ID,
        TSK_CUSTPRIO: req.body.TSK_CUSTPRIO,
        TSK_TCLS_ID: req.body.TSK_TCLS_ID
    var sql = require("mssql");
//sql Server 2000-2017
    // config for your database
    var config = {
        user: 'sql',
        password: '1234',
        server: 'localhost', 
        database: 'Infowave_HGAL30_QA' 
// connect to your database
  let pool = sql.connect(config, function (err) {
    if (err) console.log(err);

    // create Request object
    var request = new sql.Request();

    // query to the database and get the records
    //request.query('Select SUS_ID, SUS_Desc from T_SubSystems where SUS_SYS_ID = 4 order by SUS_Desc', function (err, subSystems) {//was
      //request.query('Select PRIO_ID, PRIO_DESC from T_Priority order by PRIO_ID DESC', function (err, prioritys) {
    connection.query('INSERT INTO T_Tasks (TSK_SYS_ID, TSK_SUS_ID, TSK_CUSTPRIO, TSK_TCLS_ID ) VALUES (post.TSK_SYS_ID, post.TSK_SUS_ID, post.TSK_CUSTPRIO, post.TSK_TCLS_ID )', function(err, result) {

        if (err) console.log(err)

        // send records as a response
    //    console.log("ruth");
       // console.log(prioritys);
       // res.send(prioritys);*/

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


thank you it help asdfghjyt dfrtgbnh