Thanks for your help Doug. This is turned into a good lesson for me. I don't know if you noticed but somebody named Bradley added a couple small changes to that code article link you provided. He said:
Added by bradley on 1/30/2008
In using this code with 2005 .net adn sqlexpress I had to change a few things for it to work: 1. Import system.data.sqlclient 2. Change 'localhost' in all the strings to '.\sqlserver' 3. in the 'ExecuteSQLStmt' routine, delete the two lines below: ConnectionString = "Integrated security=SSPI;" + "Initial Catalog=mydb;" + "Data Source=.\SqlExpress;" conn.ConnectionString = ConnectionString Also, if you have Management studio express running, the database will not show up until you hit 'refresh'. Hope this helps someone!
I did item 1, and 3 in item 2 I used .\sqlexpress instead.
Now the code is working!! But I don't see the new database in the visual studio. When I try to add a new connection manually I am getting this message:
"Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enable' to generate user instances."
Help at this page:
http
http://://msdn2.microsoft.com/en-us/.../ms143684.aspx
shows the following but I don't know where to implement it..
______________________________________________
sp_configure 'user instances enabled','1'
RECONFIGURE;
GO
________________________________________________
To disable generation of user instances, use:
________________________________________________
sp_configure 'user instances enabled','0'.
________________________________________________
where do I enable the user instances?
Thanks,
Tom