473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SQL Server Compatability

78
Hi -

I need to set the compatability of a database on a SQL Server 2005 to "SQL Server 2005(90)" programmatically. Ideally I would like to use the SMO objects as I already have these objects looking at the database and doing things on it, but a T/SQL script should be fine as well.

Thanks!
Jul 25 '07 #1
1 954
RoninZA
78
OK, I figured it out. Reference Microsoft.SqlServer.Smo and Microsoft.SqlServer.SqlEnum
Expand|Select|Wrap|Line Numbers
  1. using Microsoft.SqlServer.Management.Smo;
  2. using Microsoft.SqlServer.Management.Common;
  3. .
  4. .
  5. Server server = new Server(new ServerConnection(Server, Username, Password).Connect());
  6. Database database = new Database(server, connection.Database);
  7. database.CompatibilityLevel = CompatibilityLevel.Version90;
  8.  
Jul 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: T Conti | last post by:
Howdy: I have converted a huge ASP page over to .Net (C#). The old page has been will be removed from our site, but I need to have a dummy page there that will redirect the user to the new site...
10
by: Rob G | last post by:
Hello, I've seen bits and pieces of this problem, on the newsgroups, but I haven't been able to get it exactly how it happened to me... I've been using Visual Studio and learning ASP.NET with...
4
by: WStoreyII | last post by:
I know that the main two browsers are ie and netscape. However, how do i know if browsers like aol and other abstract browser put out by isps like sbc and earthlink are compatable with asp.net. I...
6
by: Nak | last post by:
Hi there, I was wondering if anyone knew of a way to maintain compatability with assemblies providing the interfaces remains the same? At the moment if I re-compile an assembly without actually...
0
by: SenthilVel | last post by:
hi I have my application built with Dotnet Framework 1.1 and now i can see most of clients having both the versions 2.0 and 1.1 in their systems, i get an issue when i run my 1.1 application . ...
1
by: abbu | last post by:
Hi, Can anybody explain the difference between standard and compatability mode compilatin in C++? Regards, abbu
2
by: David | last post by:
Hi, Does anyone know if MS SQL Server 2000, will run stability on a Windows XP based O/S, using one of the new Dual Core chips, or HT chips? Especially given that when you install it you get...
4
by: zak | last post by:
we have a suite of products that have a number of shared assemblies. During development and support the shared assemblies code will change . I want to control the versioning, so if the code chnages...
1
by: internet.system.error | last post by:
Hello, I write the casual Java code, and to make life easier at work I´ve decided to write a C# application that reads two excel files and does the usual number crunching and spits out a new file....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.