c# - Creating parameterized SQL queries in XML file -


i have been asked fix sql injection issue reported static analysis tool. sql queries stored in xml file shown below.

<import>   <command>select username id,username,(case password when 'global' 1 else 0 end) isglobal,(case password when 'external' 1 else 0 end) isexternal dba_users</command>   <command attribute="roles">select granted_role roles dba_role_privs grantee='&amp;username'</command>   <command attribute="privs">select privilege privs dba_sys_privs grantee='&amp;username'</command> </import> 

i have replace placeholders grantee='&amp;username' , grantee='&amp;username' query parameters, @paramname in sql server. c++ background , new sql , .net.

any guidelines me.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -