PC Review


Reply
Thread Tools Rate Thread

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

 
 
Krys
Guest
Posts: n/a
 
      18th Feb 2007
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")?
 
Reply With Quote
 
 
 
 
RobinS
Guest
Posts: n/a
 
      19th Feb 2007
The InitialCatalog is the name of the database you want to access in your
SQLServer database, like "Northwind" or "pubs".

Robin S.
--------------------------------------------------
"Krys" <(E-Mail Removed)> wrote in message newsp.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")?



 
Reply With Quote
 
oscar.acostamontesde@googlemail.com
Guest
Posts: n/a
 
      19th Feb 2007
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 messagenewsp.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

 
Reply With Quote
 
RobinS
Guest
Posts: n/a
 
      19th Feb 2007

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 messagenewsp.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
>

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.


 
Reply With Quote
 
Rad [Visual C# MVP]
Guest
Posts: n/a
 
      26th Feb 2007
On Sun, 18 Feb 2007 23:38:26 +0100, Krys wrote:

> 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
--
Bits.Bytes
http://bytes.thinkersroom.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"John Smith" in source data appears as "t k" in PivotTable Rachel Garrett Microsoft Excel Discussion 2 28th Jun 2008 05:21 PM
"Data Range" - "Source Data" =?Utf-8?B?Qm9iIEJhcm5lcw==?= Microsoft Excel Charting 2 16th Mar 2007 07:20 PM
err " The catalog file is damaged or an invalid catalog " Jim Microsoft Windows 2000 Windows Updates 2 10th Feb 2006 09:23 AM
Pivot Table data source "data source contains no visible tables" =?Utf-8?B?SmFuZQ==?= Microsoft Excel Worksheet Functions 0 29th Sep 2005 09:28 PM
How stop blue "Welcome screen"/"initial diaaglog box"? Nick Windows XP Basics 3 3rd Dec 2003 04:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:21 PM.