Not able to use RSQLserver
<p>I am trying to use RSQLServer and first installed RSQLServer using R studio. then I am trying to use it like this.</p>

<pre><code>library(RSQLServer)
library(DBI)
drv &lt;- dbDriver("SqlServer")
conn &lt;- dbConnect(drv, url = "Server=**MYSERVERURL;database=DBName;trusted_connection=yes;")
res &lt;- dbSendQuery(conn, "SELECT TOP 100 * FROM test_table (NOLOCK)")
str(res)
</code></pre>

<p>But I am getting error everytime. Am I missing something? The Error is Object not found.? Do I need to configure any driver (probably jTDS) first? If yes, can anyone share steps to do that? Thanks. </p>

<p>Error text</p>

<pre><code>&gt; conn &lt;- dbConnect(drv, url = "Server=**MYSERVERURL;database=DBName;trusted_connection=yes;")
Error in dbConnect(drv, url = "Server=**MYSERVERURL;database=DBName;trusted_connection=yes;") : 
  object 'drv' not found
&gt; res &lt;- dbSendQuery(conn, "SELECT TOP 100 * FROM test_table (NOLOCK)")
Error in dbSendQuery(conn, "SELECT TOP 100 * FROM test_table (NOLOCK)") : 
  object 'conn' not found
&gt; str(res)
Error in str(res) : object 'res' not found
</code></pre>

<p>Note: name of table and database changed. </p>