on 2016 May 30 2:37 PM
We are trying to get the data from VFP tables using Advantage .Net Data provider. When we have installed the “dataprovider.exe” which we have downloaded from following URL:
http://devzone.advantagedatabase.com/dz/content.aspx?Key=20&Release=19&Product=4&Platform=11
Here we didn’t provide any information such as (Customer number or Company name Or S-user ID) while downloading the installer and during the installation also it didn’t ask for any information such as (Customer number or Company name Or S-user ID).
When we have installed the installer (dataprovider.exe) we have got the DLL for Advantage .Net Data provider, So we have added that DLL reference to our application and queried the VFP tables and we are able to get the data from VFP tables when running application in my machine that is my personal desktop.
We are getting issue here when we access my machine through remote desktop from a different machine. We are getting following error:
Error 5185: Local server connections are restricted in this environment. See the 5185 error code documentation for details. axServerConnect
My Code is as follows:
public void GetVFPData() { try { string path = @"E:\tfssource\POC\AdvantageODBCExample\AdvantageODBCExample\reylin\reylin\data"; AdsConnection conn = new AdsConnection("data source=" + path + ";tabletype=vfp;servertype= Local;"); AdsCommand cmd; var adapter = new AdsDataAdapter();
conn.Open(); // create a command object cmd = conn.CreateCommand(); // specify a simple SELECT statement cmd.CommandText = "select * from Category";
var table = new DataTable(); adapter.SelectCommand = cmd;
adapter.Fill(table); conn.Close(); } catch (AdsException e) { // print the exception message Console.WriteLine(e.Message); } catch (Exception) { throw; } } } |
Please help and guide us to move further. We appreciate your quick response for the email that we have sent.
Thanks you very much.
Request clarification before answering.
I have managed to fix the issue by Creating "ads.ini" file in my Debug folder of the application.
The content of ads.ini file is:
[SETTINGS]
MTIER_LOCAL_CONNECTIONS=1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.