title: How to include ® register symbol In connection string
body: <p>Here is a connection string to a database in sql server  2008:</p>
  
  <pre><code>Provider=MSDASQL.1;Persist Security Info=False;User ID=dbUsers;Extended Properties=""DSN=testDB;Description=testDB;APP=Microsoft® Windows® Operating System;WSID=DevComp;DATABASE=testDB;Trusted_Connection=Yes;Initial Catalog=testDB
  </code></pre>
  
  <p>Inside a vb6 com object, I need to read a connection string connStr from a text file and pass it to a stored procedure on sql server 2008. The connStr includes the registered character ® with ASCII value 194. </p>
  
  <p>When I call a stored procedure from inside the com, SQL server does not accept the connStr when I read it from a text file and send it to stored procedure.  </p>
  
  <p>I included the following meta tag on top of the ASP page that executed the com:</p>
  
  <pre><code>&lt;meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /&gt; 
  </code></pre>
  
  <p>The change of the character set allows me to send the connStr which is read from the text file and send it to the stored procedure from the ASP page. 
  But the problem remains when calling the stored procedure from the com. After reading the connStr from the file, I examined the connStr by Executing </p>
  
  <pre><code>Response.Write connstr 
  </code></pre>
  
  <p>and I realized the char ® was changed to capital R within the connStr.</p>
  
  <p>I tried: </p>
  
  <pre><code>connStr = replace(connStr, “R”, “®”)
  connStr = replace(connStr, “R”, chr(194))
  connStr = replace(connStr, “R”, “&amp;reg;”)
  connStr = replace(connStr, “R”, “&amp;#174;”)
  </code></pre>
  
  <p>But inside the com the connStr remains as it was with capital R instead of the char ®. </p>
  
  <p>So how can I replace the capital R with the char ® so that I pass the correct connStr that includes the character ®  to sql server?
  Does this change of character happen because of how the connection string is read from the text file?
  I am I supposed to change the character set in Visual Basic 6 editor? If so how?</p>
  
  <p>Thank you,</p>