locked
Using MS Access (mdb) on Godaddy (defined on web.config) RRS feed

  • Question

  • User-1562364163 posted

    Hi all

    I'm trying just to connect some ASP.NET 2 pages to MDB database, but the server doesn't recoignize file path or file dsn.

    Please anyone knows how to connect MS Access using ASP.Net on Godaddy??

    Error when I try file dsn or direct mdb file connection:
    System.FieldAccessException: Attempted to access a field that is not accessible by the caller

    Using FILE DSN:
    <add name="cnAutoRent" connectionString="filedsn=d:\hosting\mydomain\_dsn\access_auto.dsn;pwd=PWD;uid=USER" providerName="System.Data.Odbc" />

    Using MDB FILE:
    <add name="cnAutoRent" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:/hosting/mydomain/access_db/auto.mdb" providerName="System.Data.OleDb" />

    Thursday, October 25, 2007 11:21 AM

Answers

  • User-1562364163 posted

    Hi

    I found the solution, this is not a file access or database exception.

    GoDaddy is medium trust host, and dont accept some components (like MagicAjax)

     

    When I remove MagicAjax references, everything works fine.

    thanks
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2007 5:58 PM

All replies

  • User-1199946673 posted

    Place the database in the App_Data folder:

    connectiionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|auto.mdb"

    Thursday, October 25, 2007 11:59 AM
  • User-1562364163 posted

    I try changing and copy .mdb file to /App_data directory... but still the same problem

    Exception Details: System.FieldAccessException: Attempted to access a field that is not accessible by the caller.

    Thursday, October 25, 2007 1:30 PM
  • User-821857111 posted

    The error you are getting has nothing to do with databases. http://msdn.microsoft.com/en-us/library/system.fieldaccessexception(VS.71).aspx

    Can you show the actual line of code that throws this error?  Also, although not related to the problem, never use DSNs with Access.  Always use the Jet OleDb provider. 

     

    Thursday, October 25, 2007 3:44 PM
  • User-1562364163 posted

    Hi

    I found the solution, this is not a file access or database exception.

    GoDaddy is medium trust host, and dont accept some components (like MagicAjax)

     

    When I remove MagicAjax references, everything works fine.

    thanks
     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 25, 2007 5:58 PM
  • User-816707301 posted

     Thanks it worked for me.

    Saturday, January 31, 2009 6:08 AM