I have databases that have names as XXX.XX_ll.
During a regular querying of database in SQL as well, the database name has to be put into [ ] as [XXX.XX_ll]
When I pass the [] around the database name in connection string,it fails on me
Here is what Im passing to my connection string
Dim str As String = "Data Source=" + "'" + ServerName + "'" + ";Initial Catalog=" + "'[" + dbname + "]'" + ";User ID=;Password=p"
During a regular querying of database in SQL as well, the database name has to be put into [ ] as [XXX.XX_ll]
When I pass the [] around the database name in connection string,it fails on me
Here is what Im passing to my connection string
Dim str As String = "Data Source=" + "'" + ServerName + "'" + ";Initial Catalog=" + "'[" + dbname + "]'" + ";User ID=;Password=p"