RE: How to create an ODBC Datasource programatically in C#

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 11/17/04


Date: Wed, 17 Nov 2004 08:18:06 -0800

Just think about what an "ODBC datasource" is under the hood...
A "User" ODBC data source is just a text file, with the extension .dsn. Have
a look at an existing one to determine what to write and where...
A system data source is slightly more complex, but not much. It's just a
registry setting.



Relevant Pages

  • Re: Pass through / ODBC Data Source
    ... ODBC Data Source Names can be user-specific, ... I have multiple users "sharing" a single DSN. ... I have a linked table in my shop database to ...
    (microsoft.public.access.queries)
  • RE: Q: using DSN
    ... Dim dsn As String = ConfigurationSettings.AppSettings ... You must first create the DSN via the "ODBC Data Source Administrator" ... Then use the following connection string - with your own DSN ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Use of VisualFoxpro 8 data source.
    ... You will either need to make the connection via MS Query (it's on the Tools ... menu in the Select Data Source dialog box) or using VBA. ... > An existing driver for VFP tables on the 'User DSN' tab. ... > An existing driver for VFP tables on the 'System DSN' tab. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: "Word was unable to open the Excel data source" Asp.net Mailme
    ... (even though it is Excel, ... to check that the account has access to the ODBC DSN. ... >> its data source when OpenFileName executes. ... >> Peter Jamieson ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Word could not reestalish a DDE connection to ACCESS DB
    ... OK, You must be using Word 2002 or later to have the OLEDB option, so ... know at this point that the .dsn points to a .mdb, ... if everyone else is using DDE to open the data source ...
    (microsoft.public.word.mailmerge.fields)