Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Initial catalog Vs DataBase in constring

Author  Topic 

DeepakNewton
Starting Member

39 Posts

Posted - 2009-05-14 : 02:51:58
Hi All,
I am using ADO connection String to connec to my SQL 2005 Database
I have got a Wiered Issues
In the connection String If I Use "DataBase" then I am Getting an Error
"[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "LTDRating" requested by the login. The login failed. "


But When I Use "Initial Catalog" then its working

Below is the Connection string

strConnectString="DRIVER={SQL Server};SERVER=MyServer; Intial Catalog=MyDatabase;UID=" & id & ";PWD=" & pd


Could You please suggest why it takes Intial catalog and Not database ?

Thanks
Deepak.N
   

- Advertisement -