Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / February 2007

Tip: Looking for answers? Try searching our database.

Available "Initial Catalog" in given Data Source (sql)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krys - 18 Feb 2007 22:38 GMT
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")?
RobinS - 19 Feb 2007 04:06 GMT
The InitialCatalog is the name of the database you want to access in your
SQLServer database, like "Northwind" or "pubs".

Robin S.
--------------------------------------------------
> 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")?
oscar.acostamontesde@googlemail.com - 19 Feb 2007 09:37 GMT
> The InitialCatalog is the name of the database you want to access in your
> SQLServer database, like "Northwind" or "pubs".
[quoted text clipped - 5 lines]
> > 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 ;)
RobinS - 19 Feb 2007 15:46 GMT
>> The InitialCatalog is the name of the database you want to access in
>> your
[quoted text clipped - 10 lines]
> Try with a query:
> SELECT * FROM sys.databases ;)

What if you leave out the InitialCatalog phrase in the connection string?

Have you checked out http://www.connectionstrings.com to see if there's any
info that will help you there?

Robin S.
Rad [Visual C# MVP] - 26 Feb 2007 18:28 GMT
> 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")?

If i'm not wrong if you don't specify an initial calalog SQL server will
connect to the default database of the user specified in the connection
string
Signature

Bits.Bytes
http://bytes.thinkersroom.com


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.