Ver Mensaje Individual
  #10 (permalink)  
Antiguo 14/08/2006, 01:29
Avatar de TCL_ZIP
TCL_ZIP
 
Fecha de Ingreso: noviembre-2003
Ubicación: Esporles, Mallorca, España
Mensajes: 690
Antigüedad: 20 años, 6 meses
Puntos: 4
De la web que tu me das, creo que tiene k ser una de las siguientes conexiones.... pero nose como usarlas:

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

"Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\m ydbfile.mdf;Database=dbname;Trusted_Connection=Yes ;"
- or -
"Server=.\SQLExpress;AttachDbFilename=|DataDirecto ry|mydbfile.mdf;Database=dbname;Trusted_Connection =Yes;"
(use |DataDirectory| when your database file resides in the data directory)
Why is the "Database" parameter needed? Answer: If the database was previously attached, SQL Server does not reattach it (it uses the attached database as the default for the connection).
Using "User Instance" on a local SQL Server Express instance:

"Data Source=.\SQLExpress;integrated security=true;attachdbfilename=|DataDirectory|\myd b.mdf;user instance=true;"
The "User Instance" functionality creates a new SQL Server instance on the fly during connect. This works only on a local SQL Server 2005 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. To enable the functionality: sp_configure 'user instances enabled','1' (0 to disable)
Using SQL Server 2005 Express? Don't miss the server name syntax: SERVERNAME\SQLEXPRESS (Substitute "SERVERNAME" with the name of the computer)
Mi sql, es SQL server 2005 Express, como quedaria mi codigo anterior aplicando estos strings? esque no consigo saber k datos poner en cada lugar.