This is a migrated thread and some comments may be shown as answers.

From SQL Server 2005 to SQL Server 2000

4 Answers 66 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Xtremax
Top achievements
Rank 1
Xtremax asked on 01 Jun 2010, 09:00 AM
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.


4 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 01 Jun 2010, 05:43 PM
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.
0
Asif
Top achievements
Rank 1
answered on 02 Jun 2010, 06:21 AM

0
Xtremax
Top achievements
Rank 1
answered on 02 Jun 2010, 07:27 AM
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!
0
Damyan Bogoev
Telerik team
answered on 02 Jun 2010, 05:36 PM
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.
Tags
Databases and Data Types
Asked by
Xtremax
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Asif
Top achievements
Rank 1
Xtremax
Top achievements
Rank 1
Share this question
or