title: Connect to Access database remotely
body: <p>I am trying to connect to my access databse that I have hosted with godaddy.  I have ASP 3.5, Php 5.2, and IIS 7.  I have gone and set up a virtual directory in my IIS settings for the vb script.  I am using Microsoft Visual Web Developer 2008.  Could anyone please let me know if they see something wrong with my connection string to the remote database?  I really need to use Access for this.  Thanks</p>
  
  <p>The code is similar to a tutorial I followed. <a href="http://www.youtube.com/watch?v=jmo66VQ4Fb4" rel="nofollow">Tutorial</a> (it is in Spanish but code works locally not remotely)</p>
  
  <pre><code>Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
          Dim objConn As Object
          Dim objRecords As Object
          Dim strConn As String
          Dim strQuery As String
  
          objConn = Server.CreateObject("ADODB.Connection")
          strConn = "Provider=MS Remote;" &amp; "Remote Server=http://(IP Address here);" &amp; "Remote Provider=Microsoft.Jet.OLEDB.4.0;" &amp; "Data Source=" &amp; Server.MapPath("/logs/App_Data/users.mdb") &amp; "Uid=admin" &amp; "Pwd="
          objConn.Open(strConn)
  
          strQuery = "SELECT * FROM tbl_usuarios"
          strQuery = strQuery + " Where str_usuario_ide='" + Login1.UserName + "'"
          strQuery = strQuery + " And   str_usuario_cve='" + Login1.Password + "'"
  
          objRecords = objConn.Execute(strQuery)
          If (Not objRecords.BOF) Then
              e.Authenticated = True
          Else
              e.Authenticated = False
          End If
  
          objRecords.Close()
          objConn.Close()
          objRecords = Nothing
          objConn = Nothing
      End Sub
  End Class
  </code></pre>