• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 381
  • Last Modified:

TSQLConnection to SQL Server file

Hey all

just wondering with the dbexpress component TSQLConnection what parameters do i need if i want to connect to directly to a SQL Server .MDF File.

currently i just work on registered databases with the paramters

Database (which is just the name of a registered database)

but want to work on unregistered databases with just their data file

any ideas?
1 Solution
I don't believe it's possible to "connect directly to a SQL Server .MDF file"... while SQL Server has the database running it owns all access to the mdf/ldf files... otherwise, there would be no way to ensure the integrity of the data.

The DbExpress TSQLConnection is merely an alternative access mechanism like ADO.  It communicates with the DBMS engine which performs all the accesses to the actual data.
ex_02Author Commented:
What if the MDF file is not registered with SQL Server can you connect to the file then?

Racim BOUDJAKDJIDatabase Architect - Dba - Data ScientistCommented:
To be able to exploit an MDF file you need at least a DBEngine that can interpretate its structure.  In that sense the DB Engine is a necessary API for exploiting and making sense of the data stored in the file.  Hope this helped...

so its just a sql sever specific? cause with interbase i can open a file no worries just askes for a .gdb was hoping sql server would be the same :)

but its obviously not ??
I'm not familiar with Interbase but I have a great deal of experience with MS SQL Server and other RDBMS's... all of them that I know about work as I described above.

-- Lynn
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now