title: Creat database grant select, I get cannot find the object or you do not have permission
body: <p>I have a program that I run every month. It creates a new database. Let's use dbname.
  I am connected to the server as a user with plenty of roles.</p>
  
  <p>The first command is:
  CREATE DATABASE dbname;</p>
  
  <p>This works fine and the database is created.</p>
  
  <p>The next command is:
  GRANT SELECT ON [dbo].[dbname] to myusername;</p>
  
  <p>This does not work and returns the following error:
  Cannot find the object 'dbname', because it does not exist or you do not have permission.</p>
  
  <p>I am the owner of the database.</p>
  
  <p>How do I grant select to this user.
  myuser is in the database.</p>
  
  <p>If I log onto SQL Server Management Studio as the user that created the table, I am able to apply the read permissions to this database?</p>
  
  <p>I am using SQL Server 2005 on Windows Server 2003 and the commands are sent to the server using VB.net</p>
  
  <p>Any help would be appreciated.
  TIA,
  Bill</p>