none
Unable to Eatablish Connection while Working with Remote Desktop RRS feed

  • Question

  • I am working on a Windows form and I am using Advantage Data Architecture as a database backend. Just like SQL Connection it Ads Provide same way to connect it using ADO.NET. Example

    AdsConnection cnADS = new AdsConnection();
    
       Connection connection = new Connection();
    
       AdsDataReader adsDataReader = null;

    It is working absolutely fine. However the problem lies when I access the windows application using Remote Desktop. At that time it is unable to establish the connection and the problem comes over here

     cnADS = connection.Connect(connectionString);
    
        if (cnADS != null)
    
        {
    	  ------------------------------------------
        }
    
        else
    
        {
    
         loginBE.loginError = "Connection is not established.Please try again";
    
         return loginBE;
    
        }

     

    The value of cnADS is coming out to be null remotely. When I do it locally it works fine. I don't know if this problem is with SqlConnection too but what could be reason for this problem and how can it be resolved??

     

    Thanks in Advance


    Adeel
    Friday, April 30, 2010 9:18 AM

Answers

  • When you run application using Remote Desktop where does it try to connect to? To the database on your local computer? Keep in mind that application runs on a server in this case, not locally and, most likely, does not have any permissions to access to your local database. You need to be sure that database is accessable for the application from that server where it's hosted.
    Val Mazur (MVP) http://www.xporttools.net
    • Marked as answer by maverick786us Friday, April 30, 2010 10:38 AM
    Friday, April 30, 2010 10:36 AM
    Moderator

All replies

  • When you run application using Remote Desktop where does it try to connect to? To the database on your local computer? Keep in mind that application runs on a server in this case, not locally and, most likely, does not have any permissions to access to your local database. You need to be sure that database is accessable for the application from that server where it's hosted.
    Val Mazur (MVP) http://www.xporttools.net
    • Marked as answer by maverick786us Friday, April 30, 2010 10:38 AM
    Friday, April 30, 2010 10:36 AM
    Moderator
  • Thank you. It was the local database
    Adeel
    Friday, April 30, 2010 10:42 AM