; ▁$ st h -> fin ish ; ▁ ▁$ db h -> dis connect ; ▁ ▁C # ▁A DO . NET ▁ ▁This ▁example ▁uses ▁C # ▁and ▁A DO . NET : ▁ ▁using ▁( Sql Command ▁command ▁= ▁connection . Create Command ()) ▁{ ▁▁▁▁ ▁command . Command Text ▁= ▁" SELECT ▁* ▁FROM ▁users ▁WHERE ▁US ER NAME ▁= ▁@ username ▁AND ▁RO OM ▁= ▁@ room "; ▁▁▁▁ ▁command . Parameters . Add With Value ("@ username ", ▁username ); ▁▁▁▁ ▁command . Parameters . Add With Value ("@ room ", ▁room ); ▁▁▁▁▁ ▁using ▁( Sql Data Reader ▁data Reader ▁= ▁command . Execute Reader ()) ▁▁▁▁ ▁{ ▁▁▁▁▁▁▁▁ ▁// ▁... ▁▁▁▁ ▁} ▁} ▁ ▁A DO . NET ▁Sql Command ▁will ▁accept ▁any ▁type ▁for ▁the ▁value ▁parameter ▁of ▁Add With Value , ▁and ▁type ▁conversion ▁occurs ▁automatically . ▁Note ▁the ▁use ▁of ▁" named ▁parameters " ▁( i . e . ▁"@ username ") ▁rather ▁than ▁" ?" — this ▁allows ▁you ▁to ▁use ▁a ▁parameter ▁multiple ▁times ▁and ▁in ▁any ▁arbitrary ▁order ▁within ▁the ▁query ▁command ▁text . ▁ ▁However , ▁the ▁Add With Value ▁method ▁should ▁not ▁be ▁used ▁with ▁variable ▁length ▁data ▁types , ▁like ▁varchar ▁and ▁n varchar . ▁This ▁is ▁because ▁. NET ▁assumes ▁the ▁length ▁of ▁the ▁parameter ▁to ▁be ▁the ▁length ▁of ▁the ▁given ▁value , ▁rather ▁than ▁getting ▁the ▁actual ▁length ▁from ▁the ▁database ▁via ▁reflection . ▁The ▁consequence ▁of ▁this ▁is ▁that ▁a ▁different ▁query