Please tell me the rest of the code doesn't look like this...

Posted by: Marc's Musings, on 10 Aug 2007 | View original | Bookmarked: 0 time(s)

This is not right:internal static bool DoesDbExist(SqlConnection conn, string database){    using (SqlCommand cmd = conn.CreateCommand())    {        // prefer this to a where clause as this is not prone to injection attacks        cmd.CommandText = "SELECT name FROM sys.databases";        cmd.CommandType = CommandType.Text;        ...

Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 864 | Hits: 74

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD