Share via


Code to Retrieve the Database Connection String

  1. Create a SiteConfigReadOnly object and initialize it for the "Retail" site.

    Dim oSiteConfigReadOnly
    
    Set oSiteConfigReadOnly = _
     Server.CreateObject("Commerce.SiteConfigReadOnly")
    
    oSiteConfigReadOnly.Initialize "Retail"
    
  2. Retrieve the connection string to the Data Warehouse.

    Dim sDWConnect As String
    sDWConnect = oSiteConfigReadOnly.Fields("Global Data Warehouse") _
     .Value.Fields("connstr_db_dw").Value
    
    Set oSiteConfigReadOnly = Nothing
    


All rights reserved.