Hi Saeed,
According to your description, my understanding is that you got an error when you used an External Content Type in SharePoint Online.
Please try to change the External Contents connection properties Authentication Mode to BDC identity in SharePoint 2013 Designer, then compare the result.
Whether you have created an OData service for Sharepoint 2013 Online. If not , please add it under Admin->SharePoint ->bcs->Manage connections to on-premises services.
More information about configuring the connection settings object for the Business Connectivity Services, please refer to the link below:
http://technet.microsoft.com/en-us/library/dn197241.aspx
please have a check on these articles regarding bcs on SharePoint 2013 Online:
http://technet.microsoft.com/en-us/library/dn197243.aspx
http://technet.microsoft.com/en-us/library/dn197239.aspx
As the issue is related to SharePoint Online, I recommend you post a new thread in another forum SharePoint Online :
http://social.technet.microsoft.com/Forums/en-US/home?forum=onlineservicessharepoint . More experts will assist you, then you will get more information relation to SharePoint Online.
I hope this helps.
Thanks,
Wendy