Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to connect to mdf database
Message
De
27/02/2009 03:37:01
 
 
À
26/02/2009 22:34:46
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01384460
Message ID:
01384471
Vues:
62
>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-2005

You 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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform