B
bz
Hi,
I developed several NET applications with SQL server and Access
databases, and I feel really stupid asking this question, but
everytime I used SQL database name in connection strings or I used a
connection string with placeholders for Access databases, and I
constructed the real path to MDB at runtime, before using it.
However, I saw several time connection strings like
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\
\example.mdb");
Where this actually points to? What is DataDirectory?
Also, I didn't used SqlServer Express, only real SQL Server (developer
version or production), and I saw in several programs connection
string like this:
connectionString="Data Source=.\SQLExpress;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|
Database.mdf;"
What does it do? Attach a sql server database (detached) to a sql
server express instance right in the moment when the connection string
is used? Does this works with full sql server too? I couldn't tested
it since I didn't knew where DataDirectory points to
Thank you
I developed several NET applications with SQL server and Access
databases, and I feel really stupid asking this question, but
everytime I used SQL database name in connection strings or I used a
connection string with placeholders for Access databases, and I
constructed the real path to MDB at runtime, before using it.
However, I saw several time connection strings like
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\
\example.mdb");
Where this actually points to? What is DataDirectory?
Also, I didn't used SqlServer Express, only real SQL Server (developer
version or production), and I saw in several programs connection
string like this:
connectionString="Data Source=.\SQLExpress;Integrated
Security=True;User Instance=True;AttachDBFilename=|DataDirectory|
Database.mdf;"
What does it do? Attach a sql server database (detached) to a sql
server express instance right in the moment when the connection string
is used? Does this works with full sql server too? I couldn't tested
it since I didn't knew where DataDirectory points to
Thank you