« Previous Next »

Thread: Building package for ODBC data provider

Last post 05-02-2009 12:51 AM by WorkerBee2. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 04-29-2009, 12:26 AM

    Building package for ODBC data provider

    Our ASP.NET application uses ODBC data provider. We need to have the web deployment tool create a database, an ODBC data source and update the ODBC connection string in web.config. The only documentation is that single web page that shows how to do it for SqlClient. Can you tell us how to achieve the steps I described above? Thanks!

  • 04-29-2009, 10:23 AM In reply to

    • richma
    • Top 25 Contributor
    • Joined on 04-06-2009, 12:10 PM
    • Posts 355

    Re: Building package for ODBC data provider

    hi workerbee2

    for a quicker answer please use the  Web Deployment tool (msdeploy) forum

     http://forums.iis.net/1144.aspx

  • 04-29-2009, 11:43 AM In reply to

    Re: Building package for ODBC data provider

    Hi workerbee2,

    We don't have a specific ODBC provider but system DSNs are stored in the registry, so you can grab it using the regkey and regvalue providers.

    I created a system DSN called TestODBC and then searched the registry to determine where it was stored.

    Here's an example manifest that captures this DSN (saved as manifest.xml):

    <ODBC>
    <regkey path="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\TestODBC" />
    <regvalue path="HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\TestODBC" />
    </ODBC>

    Then sync to a package:

    msdeploy -verb:sync -source:manifest=manifest.xml -dest:package=c:\ODBC.zip

    And sync from the package:

    msdeploy -verb:sync -source:package=c:\ODBC.zip -dest:auto

    Let me know if you have any questions or different ODBC connections that need to be synced.

    thanks,

    -faith

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 05-02-2009, 12:51 AM In reply to

    Re: Building package for ODBC data provider

    Thanks for the information! The problem is that there are additional registry attributes under ODBC.INI\TestODBC that are machine dependant. We will have to search the SQL Server driver, find out where it puts the driver exe, and then set the corresponding value under TestODBC, etc. I guess ODBC is no longer MS' favorite kid anymore. We will have problems too when we deploy to Azure, which may not expose the capability to create ODBC data sources. We plan to convert our app to straight SqlClient in order to easily take advantage of both of the web platform and the Azure platform.

Page 1 of 1 (4 items)
Microsoft Communities