locked
Sql throwing exceptions... RRS feed

  • Question

  • I hope someone can point me in the right direction.  I just downloaded VS 2008 Express version with SQL Express.  Afterward, I d/l the VS 2008 Pro Trial version... I don't know if that is significant or not.  My experience is primarily with MySQL and php.  VB.net, SQL, the VS environment etc are all relatively new to me.  I'm not sure I get the concept of how they all communicate.

     

    The problem:  I can create a db programatically in a new project, but if I try to do it in an existing project I get errors.  I think it may have to do with some kind of conflict between the database in my solution explorer and the one I'm trying to create programatically, but I'm not sure.  The two databases are identical (tables and columns) except for the db name.

     

    ERROR 1: The app creates a sub directory and my intent is to create the db file and place it there.  If I programatically create a db called NewDB, my app successfully creates the database to the sub directory it created as well.  However, I get the "There is already an object named 'tableName' in the database" error. 

     

     ERROR 2: If I delete the subdirectory with the dbfile in it, rerun the app, and try to recreate 'NewDB', I get the following error: "Database 'NewDB' already exists.  Choose a different database name."  How can that be if I deleted the file and directory??  

     

    I've recently discovered there is something called SSMS which apparently wasn't installed with either of my VS downloads, so I have no easy way of viewing my created database to see its structure.  Is there a way to access that from the command line like in MySQL?

     

    Any help would be greatly appreciated.

     

    Sherri

    Friday, November 21, 2008 4:19 PM

Answers

All replies