locked
Connect Remote server MS Access DB with .Net using DSN RRS feed

  • Question

  • User416285128 posted

     Hi,

    Connect Remote server MS Access DB with .Net using DSN .

    My code is:

     String ss = "Provider=MS Remote;Remote Server=http://serverName:1433; Remote Provider=Microsoft.Jet.OLEDB.4.0;DSN=Test;";
              
            OdbcConnection con = new OdbcConnection(ss);
            con.Open();
            Response.Write("Connected");

    when i try to access, i am getting the following error

     ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    but this code is working properly in the same server.

    please help me.

    Thanks

    S.Saravanan      

    Friday, February 6, 2009 11:15 AM

Answers

  • User-821857111 posted

    I tried the NTFS permissions, firewalls,and i used the full path in Data source instead of DSN.but i get the same error. please let me know if you know any way to connect Remote MS Access DB without  ODBC.

    No more than the first article I linked to can offer.  Personally, I would follow the first piece of advice that the article gives - try using SQL Server or something else.  Access is not designed for this at all.  Alternatively, develop a bunch of Web Services that expose the data from the Access database and can be called by your web app.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 12, 2009 8:39 AM
  • User-1199946673 posted

    I've never tried to connect to a remote access database, because of all this problems. Also, I didn't find any article which describes all the steps when using ASP.NET. Try OleDb instead of ODBC:

     System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(YourConnString);
     conn.Open;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 12, 2009 8:44 AM

All replies

  • User-821857111 posted

    Instead of using a DSN, try putting the full path in the Data Source property of the connection string.  

    You should avoid using ODBC with Access when deploying as part of an ASP.NET app: http://support.microsoft.com/kb/299973/

     

    Sunday, February 8, 2009 9:32 AM
  • User416285128 posted

     i put the full path instead of using DSN,i am getting the same error.

    thanks

    S.Saravanan

     

    Wednesday, February 11, 2009 11:47 PM
  • User-1199946673 posted

    If you get the same error, you're still try to use ODBC while Mike already explained that you should  avoid using ODBC!

    Also, in the first article that Mike is pointing at, you can read this:

    "I have received feedback that this "doesn't work"--while I have no idea what "doesn't work" means, I can say that along with the performance issues of using this kind of solution, there is also a painful configuration process that must be followed. NTFS permissions, firewalls, existence of MSADC, and several other issues might prevent this from working"

     

    Thursday, February 12, 2009 7:57 AM
  • User416285128 posted

     Hi,

     

      I tried the NTFS permissions, firewalls,and i used the full path in Data source instead of DSN.but i get the same error. please let me know if you know any way to connect Remote MS Access DB without  ODBC.

     

     

    Thanks

    S.Saravanan

      

     

    Thursday, February 12, 2009 8:14 AM
  • User-821857111 posted

    I tried the NTFS permissions, firewalls,and i used the full path in Data source instead of DSN.but i get the same error. please let me know if you know any way to connect Remote MS Access DB without  ODBC.

    No more than the first article I linked to can offer.  Personally, I would follow the first piece of advice that the article gives - try using SQL Server or something else.  Access is not designed for this at all.  Alternatively, develop a bunch of Web Services that expose the data from the Access database and can be called by your web app.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 12, 2009 8:39 AM
  • User-1199946673 posted

    I've never tried to connect to a remote access database, because of all this problems. Also, I didn't find any article which describes all the steps when using ASP.NET. Try OleDb instead of ODBC:

     System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(YourConnString);
     conn.Open;

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 12, 2009 8:44 AM