Your script works fine for me. I'm able to use it to open a data table that is invisible.
When you say the script "doesn't work" do you mean that the data table remains visible, or does it not appear at all (even in the window list)? Is it possible that, if the table is very large or if the table is open from a remote location, the script needs to pause to let the table open completely? In that case, I'm guessing that inserting a Wait(1.0); command between your two lines of code could help. Otherwise, check for typos.
Howard