title: Check permission to a table
body: <p>I am currently making a vb.net program that needs to check permissions on a table (if the table does not exsist, then the permission on the database, if the database does not exsist, then the permission to the sql server)</p>
  
  <p>is there a way to check thouse permissions, and how? </p>
  
  <ul>
  <li>how do i check the permissions on the table "testdb.testtable" for
  the user "testuser"</li>
  <li>how do i check the permissions on the database    "testdb" for the
  user "testuser"</li>
  <li>how do i check the permissions on    the server for user "testuser"</li>
  </ul>
  
  <p>i've been searching on google, but the result i got, was a 2 pages long sql script.</p>