Attach a database file on connect to a local SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname; 
Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been 
attached, SQL Server does not reattach it. It uses the attached database as the 
default for the connection.

  <javascript:ccstc(document.getElementById('p0cs8'));> 

Attach a database file, located in the data directory, on connect to a local 
SQL Server Express instance

Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf; 
Database=dbname;Trusted_Connection=Yes;

Why is the Database parameter needed? If the named database have already been 
attached, SQL Server does not reattach it. It uses the attached database as the 
default for the connection.

  <javascript:ccstc(document.getElementById('p0cs9'));> 

Using an User Instance on a local SQL Server Express instance

The User Instance functionality creates a new SQL Server instance on the fly 
during connect. This works only on a local SQL Server instance and only when 
connecting using windows authentication over local named pipes. The purpose is 
to be able to create a full rights SQL Server instance to a user with limited 
administrative rights on the computer. 

Data Source=.\SQLExpress;Integrated Security=true; 
AttachDbFilename=|DataDirectory|\mydb.mdf;User Instance=true;

 

 

De: [email protected] [mailto:[email protected]] En nombre de Miguel Canchas
Enviado el: jueves, 13 de enero de 2011 05:08 p.m.
Para: GUFA List Member
Asunto: [GUFA] VFP 8.0 SQL2008 string connection

 

http://www.connectionstrings.com/sql-server-2008

 

 

MK

 

De: [email protected] [mailto:[email protected]] En nombre de Mario Munuce Furze
Enviado el: jueves, 13 de enero de 2011 04:55 p.m.
Para: GUFA List Member
Asunto: [GUFA] VFP 8.0 SQL2008 string connection

 

 

Primer pregunta del año, Zorros!

 

Estoy tratando de conectarme a un sqlexpress 2008, y no doy pie con bola. No lo 
puedo hacer conectar. Alguno que me pueda tirar un cabo?

Desde ya, gracias!.

 

 

 

Cordialmente,

 

Mario Munuce Furze

Cel:+52.1.55.12 58 94 59

skype: mariomunuce

 

Responder a