How to determinate the version Sql2005

A

ad

The user of my asp.net program use Sql2005 or Sql2005 express as database,
both are possible.

I have try both version of data base, I found:
If I use Sql2005 express, the Data Source in connection string will be
..\SQLEXPRESS, like:
Data Source=.\SQLEXPRESS;Initial Catalog=myDB;Integrated Security=True

But I use Sql2005 , the Data Source in connection string can be use
(local), like:
Data Source(local);Initial Catalog=myDB;Integrated Security=True

My questions are:

1.Is it possible use the some connection string with both version of
DataBase.

2. If question 1 is impossible, how to determinate the version of Sql2005?
I want to composite the connection string with program.
 
A

Ashish Kaila

Hello,
I think if you use the format <Server>\<SQLInstanceName> it will work on any
edition of sql server.
Thanks,
Ashish
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top