Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

select

const loadpic = () => {
    return new Promise((resolve, reject)=>{
        sql.connect(config).then(
            pool =>{
                return pool.request()
                .input('Names',TYPES.Char,'Roger')
                .query('select Email  from Account where Names=@Names')
                .then((result) =>{
                    sql.close();
                    resolve(result);
                }).catch(err =>{
                    if(err) console.log(err);
                    sql.close();
                    reject(err);
                })
            }
        )
    })
}
loadpic()
        .then(result =>{console.log(result)})
        .catch(err=>{if(err) console.log(err)})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select
ADD COMMENT
Topic
Name
7+8 =