ananda - Friday, July 13, 2012 9:42 AM:
Hi,
I am trying to connect Aras Innovator to third party application (Small accounting & ERP software) and the method is exactly same as the example shown in the 'www.aras.comhttp:/.../further-example-of-federated-data.aspx' except that its an ODBC connection..
-----------------------
// Connect to external database
System.Data.Odbc.OdbcConnection myConnection = new System.Data.Odbc.OdbcConnection("PORT=9000;DRIVER=ODBC_9000;SERVER={(local)}");
// construct sql Select statement to retrieve data from external database.
string sqltext = "SELECT StockItem.`$Name`, StockItem.`$OpeningBalance` FROM ABCCompany.admin.StockItem StockItem";
System.Data.Odbc.OdbcCommand com = new System.Data.Odbc.OdbcCommand(sqltext);
com.Connection = myConnection;
myConnection.Open();
System.Data.Odbc.OdbcDataReader myDataReader = com.ExecuteReader();
-----------------------
Looks like there is no probelm with connecting to the application.. but while fetching the data or firing the query I am getting the following error...(or I may be wrong also..)
"index was outside the bounds of the array"
Thought could be problem with the special characters in the query string, added escape characters in all possible way.. but nothing worked..
Any help?
Thanks
Anand