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:
publicvoidGetVFPData() { try { stringpath=@"E:\tfssource\POC\AdvantageODBCExample\AdvantageODBCExample\reylin\reylin\data"; AdsConnectionconn=newAdsConnection("data source="+path+";tabletype=vfp;servertype= Local;"); AdsCommandcmd; varadapter=newAdsDataAdapter();
conn.Open(); // create a command object cmd=conn.CreateCommand(); // specify a simple SELECT statement cmd.CommandText="select * from Category";
vartable=newDataTable(); adapter.SelectCommand=cmd;
adapter.Fill(table); conn.Close(); } catch (AdsExceptione) { // 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.