TSQLConnection to SQL Server file

Posted on 2005-04-27
Last Modified: 2008-02-01
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?
Question by:ex_02
    LVL 20

    Accepted 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.

    Author Comment

    What if the MDF file is not registered with SQL Server can you connect to the file then?

    LVL 23

    Expert Comment

    by:Racim BOUDJAKDJI
    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...

    LVL 2

    Expert Comment

    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 ??
    LVL 20

    Expert Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    CDC audit 17 67
    Database restore 8 39
    vcenter 6 u2 install question 1 55
    oracle query help 29 45
    Introduction If you are not already aware of what you could use a table with sequential integer values for in SQL, you can read Delimited String Parsing in SQL Server 2005 or later ( by BrandonGalderisi (h…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now