Dear,
I tried to run your code, but it shows: Invalid object name 'master.sysdatabases'. I have no idea to solve my problem. In fact, I am junior in SQL Server. So, I try to post my information as details as possible, so that you can give me advice.
I am using VWD Express 2005 to program a web application with a DB under SQLExpress. My code for the connection between web application and DB as follows:
<add name="MyConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MyDB.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
In the Database Explorer of VWD, I only find my DB file: MyDB.mdf
Any idea about that? Thanks.