sql server - "use database" not found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atomz4peace
    New Member
    • May 2006
    • 1

    sql server - "use database" not found

    I am trying to script the creation of a database in sql server 2000. I have something like:

    create database test
    go

    use test
    go

    create table .....etc.....

    When I try to run this in the query analyzer, I get the error on the "use test" line that says:

    could not location entry in sysdatabases for database 'test'. No entry found.....etc.. ..

    Can anyone tell me what I did wrong? My connection is initially bound to the master database since test does not exist. Don't I still need the use test?

    Thanks!
    Jim
Working...