|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Available "Initial Catalog" in given Data Source (sql)In SQL connection string i have to provide Initial Catalog and Data
Source. How can i read available initial catalogues when i know only the given Data Source (for example "(local)\SQLEXPRESS")? The InitialCatalog is the name of the database you want to access in your
SQLServer database, like "Northwind" or "pubs". Robin S. -------------------------------------------------- Show quote "Krys" <i*@is.fake> wrote in message news:op.tnyuicq0kno4s0@krys... > In SQL connection string i have to provide Initial Catalog and Data > Source. How can i read available initial catalogues when i know only the > given Data Source (for example "(local)\SQLEXPRESS")? On Feb 19, 5:06 am, "RobinS" <Rob...@NoSpam.yah.none> wrote: Try with a query:> The InitialCatalog is the name of the database you want to access in your > SQLServer database, like "Northwind" or "pubs". > > Robin S. > -------------------------------------------------- > > "Krys" <i***@is.fake> wrote in messagenews:op.tnyuicq0kno4s0@krys... > > In SQL connection string i have to provide Initial Catalog and Data > > Source. How can i read available initial catalogues when i know only the > > given Data Source (for example "(local)\SQLEXPRESS")? SELECT * FROM sys.databases ;) <oscar.acostamonte***@googlemail.com> wrote in message
Show quote news:1171877855.020794.147210@v45g2000cwv.googlegroups.com... What if you leave out the InitialCatalog phrase in the connection string?> On Feb 19, 5:06 am, "RobinS" <Rob...@NoSpam.yah.none> wrote: >> The InitialCatalog is the name of the database you want to access in >> your >> SQLServer database, like "Northwind" or "pubs". >> >> Robin S. >> -------------------------------------------------- >> >> "Krys" <i***@is.fake> wrote in messagenews:op.tnyuicq0kno4s0@krys... >> > In SQL connection string i have to provide Initial Catalog and Data >> > Source. How can i read available initial catalogues when i know only >> > the >> > given Data Source (for example "(local)\SQLEXPRESS")? > > Try with a query: > SELECT * FROM sys.databases ;) > Have you checked out http://www.connectionstrings.com to see if there's any info that will help you there? Robin S. On Sun, 18 Feb 2007 23:38:26 +0100, Krys wrote:
> In SQL connection string i have to provide Initial Catalog and Data If i'm not wrong if you don't specify an initial calalog SQL server will> Source. How can i read available initial catalogues when i know only the > given Data Source (for example "(local)\SQLEXPRESS")? connect to the default database of the user specified in the connection string |
|||||||||||||||||||||||