From SQL Server 2005 to SQL Server 2000

5 posts, 0 answers
  1. James
    James avatar
    2 posts
    Member since:
    Sep 2012

    Posted 01 Jun 2010 Link to this post

    I was writing an application with Telerik ORM.  Initially, the project was built to run on SQL Server 2005.  After compiling the Data Layer in to a dll file, it worked fine when placed in the bin folder of the Web Application (together with the rest of the other dll, i.e Telerik.OpenAccess.dll. etc....

    After a while, I realised that the targetted database is SQL Server 2000.  I tried to change the configuration in Web.Config to point tot he SQL Server 2000 (pointing to a database with the same db structure).  However, I encounter an error that says that it only works for SQL Server 2005 and above.

    I had to recompile the data layer again to make it work on SQL Server 2000.  I also needed to add an extra dll file called Telerik.OpenAccess.NTDS.dll.  

    I was wondering, if there there is a way for me to switch between Microsoft SQL 2005 and Microsoft SQL 2000 just by changing something in web.config instead of rebuilding the entire data layer?  Also, is it correct for me to add the Telerik.OpenAccess.NTDS.dll in the bin folder?   I read the deployment documents and it is not one of the recommended dlls that had to be present in the bin folder.


  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 01 Jun 2010 Link to this post

    Hi James Leong,

    You can set the driver in the backendconfiguration node in the configuration file as shown below:

    <backendconfiguration id="mssqlConfiguration" backend="mssql" driver="ntds">
         <mappingname>mssqlMapping</mappingname>
    </backendconfiguration>

    By default the driver attribute is not set, so you will probably have to add it. That will be enough to switch from MSSQL Server 2005 to MSSQL Server 2000.
    Hope that helps.

    Kind regards,
    Damyan Bogoev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Asif
    Asif avatar
    2 posts
    Member since:
    Jun 2010

    Posted 02 Jun 2010 Link to this post


  5. James
    James avatar
    2 posts
    Member since:
    Sep 2012

    Posted 02 Jun 2010 Link to this post

    Hi,

    Thanks for the response.  It was most helpful.  I am able to switch between the different databases just by changing the backendconfigurationname in my web.config.

    I basically configured the app.config in my data layer to support 2 type of database configuration, i.e.

        <backendconfigurations> 
          <backendconfiguration id="mssqlConfiguration" backend="mssql"
            <mappingname>mssqlMapping</mappingname> 
          </backendconfiguration> 
          <backendconfiguration id="mssqlConfiguration2000" backend="mssql" driver="ntds"
            <mappingname>mssqlMapping</mappingname> 
          </backendconfiguration> 
        </backendconfigurations> 

    After that, I can switch between the 2 different databases in my web application by simply configuring the web.config with:

            <connections> 
                <connection id="DatabaseConnectionNbnAdmin"
                    <databasename>nbnadmin</databasename> 
                    <servername>(LOCAL)\SQLEXPRESS</servername> 
                    <integratedSecurity>True</integratedSecurity> 
                    <backendconfigurationname>mssqlConfiguration</backendconfigurationname> 
                    <connectionParams>AttachDbFileName=|DataDirectory|\nbnadmin.mdf;</connectionParams> 
                </connection> 
          <!--<connection id="DatabaseConnectionNbnAdmin"
            <databasename>nbnadmin2000</databasename> 
            <servername>xxxxxxxx</servername> 
            <integratedSecurity>False</integratedSecurity> 
            <user>xxxxx</user> 
            <password>xxxxx</password> 
            <backendconfigurationname>mssqlConfiguration2000</backendconfigurationname> 
          </connection>-->       
        </connections>  

    Thanks a million for your help!
  6. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 02 Jun 2010 Link to this post

    Hi James Leong,

    We are glad to see the problem resolved.
    If any other questions arise please contact us back.

    Regards,
    Damyan Bogoev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner