Hi Narapat,
From your post, this issue may cause by some restrictions in SharePoint Online.
Because it is a multi-tenant environment, when you upload a sandboxed solution to the Solution Gallery, SharePoint Online performs a further round of validation checks, in addition to those performed by on-premise SharePoint installations.
A sandboxed solution cannot be activated if it contains code calling any of the following namespaces: Microsoft.SqlServer, Microsoft.Win32 etc.
For more detailed information about "additional solution restrictions in SharePoint Online", please refer to the link below:
http://msdn.microsoft.com/en-us/library/ie/gg454741.aspx
Thanks,
Edward Qu