DB Connection Strings

From PeformIQ Upgrade
Revision as of 19:00, 30 January 2011 by PeterHarding (talk | contribs) (Created page with '* http://www.codeproject.com/KB/database/connectionstrings.aspx#OLE%20DB%20Visual%20FoxPro =Examples= ==Visual FoxPro== If you are using a database container, the connection s...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Examples

Visual FoxPro

If you are using a database container, the connection string is the following:

strConnection = _T("Driver={Microsoft Visual Foxpro Driver};UID=;"
  "SourceType=DBC;SourceDB=C:\\DatabasePath\\MyDatabase.dbc;Exclusive=No");

If you are working without a database container, you must change the SourceType parameter by DBF as in the following connection string:

strConnection = _T("Driver={Microsoft Visual Foxpro Driver};UID=;"
   "SourceType=DBF;SourceDB=C:\\DatabasePath\\MyDatabase.dbc;Exclusive=No");

OLE DB Provider for Visual FoxPro

strConnect = _T("Provider=vfpoledb;"
    "Data Source=C:\\DatabasePath\\MyDatabase.dbc;");

For more information, see: Microsoft OLE DB Provider for Visual FoxPro.