>I created a SQL database via VS2005. That created a MDF file in the app_data directory.
>
>How can I create a DSN entry to this MDF database? Or how can I connect to this MDF file from VFP?
If you've created a SQL database via VS2005 (I assume in Visual Studio 2005), you attached to a (most likely) SQL Server database server, which controls access to the MDF file. You interact with the database server process, not with the file directly like you do with VFP.
You will need to know the database server name, and the name of the database you created within the server. You can then use either:
- VFP SQL pass through commands ( e.g. SQLSTRINGCONNECT( ) ), connecting to the database server and database via ODBC
- A CursorAdapter, connecting to the database server and database via OLEDB
http://connectionstrings.com/sql-server-2005You may need to install an ODBC or OLEDB driver as required.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up