?
Solved

TSQLConnection to SQL Server file

Posted on 2005-04-27
5
Medium Priority
?
379 Views
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

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

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

any ideas?
0
Comment
Question by:ex_02
5 Comments
 
LVL 22

Accepted Solution

by:
JesterToo earned 1840 total points
ID: 13883219
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.
0
 

Author Comment

by:ex_02
ID: 13883277
What if the MDF file is not registered with SQL Server can you connect to the file then?

0
 
LVL 23

Expert Comment

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

Racimo
0
 
LVL 2

Expert Comment

by:dboyd6868
ID: 13890788
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 ??
0
 
LVL 22

Expert Comment

by:JesterToo
ID: 13890929
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
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…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Suggested Courses

578 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