How to use the varchar data type in c#?
<p>I have this piece of code and I want to make it varchar not string. What is the appropriate syntax to do that in c#</p>

<pre><code> string emri = row["Nome"].ToString();
</code></pre>

<p>I have a query that I have to run and I use emri in it and compare it with a column in table which I have created in mysql. the column in mysql is of type varchar(20). When I execute my code it gives an error in my query and I was guessing maybe it was for this reason </p>

<pre><code>I have this query 
string query = "IF NOT EXISTS(SELECT * FROM clienti WHERE CodCliente=   " + id + "  AND Nome = '" + emri + "' AND RagioneSociale=' " + ragSoc + " ' AND PartitaIVA=' " + piva + " ') INSERT INTO clienti VALUES(" + id + " ,' " + emri + " ',' " + ragSoc + " ',' " + piva + " ') else UPDATE clienti SET( " + id + " ,' " + emri + " ',' " + ragSoc + " ',' " + piva + " ')";
</code></pre>

<p>and it gives me this problem </p>

<pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF NOT EXISTS(SELECT * FROM clienti WHERE CodCliente=   1  AND NomeCliente = 'Jo' at line 1
</code></pre>
