Access, ASP and a remote server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChristoL
    New Member
    • Jan 2008
    • 1

    Access, ASP and a remote server

    Good day all

    I have a c# and asp.net web page going. I am use two db's (both MS access). The one is my own in a folder app_data in my root. I can use a asp:AccessDataS ource with the datafile = "~/App_Data/myDB.mdb" and that works fine. But now I need to access a db on a remote server as well.
    Now as far as I can gather, an asp:AccessDataS ource uses only relative connnections, so accessing a db on a remote server is not possable.
    I tried using an asp:SqlDataSour ce and added an IIS_WPG and an ASP.NET Machine Account with full control and I still get a

    The Microsoft Jet database engine cannot open the file 'TheirDB.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    error. Where am I going wrong?

    My asp.net code is as follows:

    <asp:SqlDataSou rce ID="SqlDataSour ce1"
    runat="server"
    ConnectionStrin g="<%$ ConnectionStrin gs:TheirDBConne ctionString %>"
    ProviderName="< %$ ConnectionStrin gs:TheirDBConne ctionString.Pro viderName %>"
    SelectCommand=" SELECT [MFRMfrName] FROM [MFR] ORDER BY [MFRMfrName]">
    </asp:SqlDataSour ce>

    Web.config:

    <add name="TheirDBCo nnectionString" connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data Source=\\Intran etserver\TheirD B.mdb"
    providerName="S ystem.Data.OleD b" />

    Help please
  • leoiser
    New Member
    • Jul 2007
    • 41

    #2
    Make sure your folder having correct access rights.type \\Intranetserve r in run

    if you can not access,then it is the access right problem.Option is Set the DB folder in FTP Sites (in IIS) , it will solve the issue.

    Originally posted by ChristoL
    Good day all

    I have a c# and asp.net web page going. I am use two db's (both MS access). The one is my own in a folder app_data in my root. I can use a asp:AccessDataS ource with the datafile = "~/App_Data/myDB.mdb" and that works fine. But now I need to access a db on a remote server as well.
    Now as far as I can gather, an asp:AccessDataS ource uses only relative connnections, so accessing a db on a remote server is not possable.
    I tried using an asp:SqlDataSour ce and added an IIS_WPG and an ASP.NET Machine Account with full control and I still get a

    The Microsoft Jet database engine cannot open the file 'TheirDB.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

    error. Where am I going wrong?

    My asp.net code is as follows:

    <asp:SqlDataSou rce ID="SqlDataSour ce1"
    runat="server"
    ConnectionStrin g="<%$ ConnectionStrin gs:TheirDBConne ctionString %>"
    ProviderName="< %$ ConnectionStrin gs:TheirDBConne ctionString.Pro viderName %>"
    SelectCommand=" SELECT [MFRMfrName] FROM [MFR] ORDER BY [MFRMfrName]">
    </asp:SqlDataSour ce>

    Web.config:

    <add name="TheirDBCo nnectionString" connectionStrin g="Provider=Mic rosoft.Jet.OLED B.4.0;Data Source=\\Intran etserver\TheirD B.mdb"
    providerName="S ystem.Data.OleD b" />

    Help please

    Comment

    Working...