Getting the actual value of a constant whose name is read from a f

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to get the actual value of a constant which is defined inside
a class programatically?

Suppose I want to build a SQL query dinamically, including parameters, which
makes wonders to the SQL speed. I have a XML file which is something like

<SQL sentence="SELECT NAME WHERE ID=?">
<PARAM name="ID" type="SqlDbType.NVarChar">
</SQL>

In my code, what I want to happen is

sc.Parameters.Add("ID", SqlDbType.NVarChar)

Any suggestions?
 
Are you asking about how to read data from XML files or how to use
parameterized queries with SQL?
 
Back
Top