Default context

DbEntry.Net allows user pre-setup some database connections and set one of them as the default context

  • The following config file shows 3 phases of project, and the current selected is "development":
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="org.hanzify.llf.Settings"
      type="org.hanzify.llf.util.Setting.NameValueSectionHandler, org.hanzify.llf.util" />
  </configSections>

  <org.hanzify.llf.Settings>
    <add key="DefaultContext" value="development" />

    <add key="test.DataBase" value="@Access : @~WMStest.mdb" />
    <add key="development.DataBase" value="@Access : @~WMSdevelp.mdb" />
    <add key="SqlServer.DataBase" value="@SqlServer2005 : data source=wms;initial catalog=WMS;user id=sa;password=1" />
  </org.hanzify.llf.Settings>
</configuration>

  • The following config file stored some databases connections infomation in it, and the current context is "Access"
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="org.hanzify.llf.Settings"
      type="org.hanzify.llf.util.Setting.NameValueSectionHandler, org.hanzify.llf.util" />
  </configSections>

  <org.hanzify.llf.Settings>
    <add key="DefaultContext" value="Access" />

    <add key="Access.DataBase" value="@Access : @~test.mdb" />

    <add key="Excel.DataBase" value="@Excel : @~test.xls" />

    <add key="SqlServer.DataBase" value="@SqlServer2005 : data source=wms;initial catalog=WMS;user id=sa;password=1" />

    <add key="MySql.DataBase"
      value="@MySql : server=localhost;user id=root; password=123; database=mytest; pooling=false" />
    <add key="MySql.DbProviderFactory"
      value="@SmartDbFactory : MySql.Data, Version=5.1.2.2, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
  </org.hanzify.llf.Settings>
</configuration>

Last edited Jul 23, 2007 at 9:39 AM by lifeng, version 3

Comments

No comments yet.