check sql server 2000 or sql server 2005

Hi..

I have a web application(ASP.NET 2.0 + C#). I have sql server 2000 as well as sql server 2005.

Several queries in my application work well with the sql server 2005, and the same query fails in the sql server 2000.

How to check if the database is connected to sql server 2000 or sql server 2005 and then call the queries accordingly through the c# code?

Thanks

0
venkatzeus
10/12/2007 7:04:43 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

1 Replies
645 Views

Similar Articles

[PageSpeed] 35

That may be happening if you are using built-in stored procedures or the INFORMATION_SCHEMA from 2005.  There's stuff in 2005 that doesn't exist in 2000. 

You are the one establishing the connection, right?   You have to know which one you are connecting to when you do, right?  You'll have to have a connection to your 2005 instance and one to your 2000 instance.  Although for performance purposes, I'd recommend migrating your db to 2005.

Of course, you can always look at the Database property of your connection object if you are getting it from somewhere deep in the bowels of legacy code.


I love to display the non-secure items...
Charlie Asbornsen
Dont forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
0
Charles
10/12/2007 12:51:53 PM
Reply:

Similar Artilces:

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.comhttp://www.mojoportal.com...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

sql server 2005 to sql server 2000
Due to certain unavoidable reasons we have to move an application from sql server 2005 to sql server 2000 (yes from 2005 to 2000).  would changing the connection string be sufficient or are there other issues involved. How hard is it going to be to get it to work? Any tips or suggestions are greatly appreciated. Yes you will need to change the connection string!However you must look very carefully at the database structure. Do two script exports of every object in the database - one for SQL2000 compatibility and one without. Compare these two scripts, if they are significantly differe...

Move from SQL Server 2000 to SQL Server 2005 with VS 2005
 We have a new database server for SQL Server 2005.  To use our old VS 2005 websites, which were connected toanother database server with SQL Server 2000, what should I do?  Just change the server name of the connection stringin the Source code and/or Web.config?  My preliminary testing seemed to be not effective.TIA,Jeffrey wonjartran:  We have a new database server for SQL Server 2005.  To use our old VS 2005 websites, which were connected toanother database server with SQL Server 2000, what should I do?  Just change the server name of the connectio...

Connecting to SQL Server 2000 with SQL Server 2005
I currently have Enterprise 2000 installed but would like to uninstall and install SQL Server 2005. Are there any problems if I try to reconnect to other SQL 2000 servers or other serious issues I need to consider before doing this change ?   Thanks,...

SQL Server 2000
Hi We have SQL Server 2000 installed on Windows Server 2003. Now wanted to upgrade to SQL Server 2005. Have tried simply inserting SQL Server 2005 dvd and installing on Windows Server 2003. Installation was not successful.  Let me know standard methodology to upgrade SQL Server 2000 to 2005 . Thanks,-- "Mark As Answer" if my reply helped you -- Friend, this tutorial may help you http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1188595,00.html http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1194265,00.html http://msdn.microsoft.com/en-us/...

sql server 2000 , sql server 2005 express
Hi, currently I m using vs studio 2005 to develop a in house web application... The problem is tat my company has only sql server 2000 license... n when creating the application cos vs studio comes together w sql server 2005 express, so i used it to develop the application. However, i tink there are compatibiliy issues with both databases. I used sql 2005 express mainly because in vs studio 2005 there are the LOGIN tools in which i cant create and they come mapped to databases created using sql 2005 express... so is there any compatibility issues when i deploy this application? and if so, is...

Sql Server 2000 & Sql Server 2005
Dear AllIs there is a big defference between Sql Server 2000 and Sql Server 2005 and if  i studying thesql server 2000 about  40% or 50% from it..can i upgrade and styding 2005 or i must completing studying sql server 2000 more enough.Please i want a good and practical advise.(i can't get the chance to develope a real life database with sql server2000 until this moment.)Many Thanks 4 All. Hey,A lot of the concepts that are in SQL 2000 will still apply, such as data types, table design, indexes, pk/fk relationships, and such...  DTS has changed completely; in a...

Convert Sql Server 2005 to Sql Server 2000
I have to downgrade a eCommerce database from Sql Server 2005 to Sql Server 2000 due to hosting server's support compatibility. Almost all features in the original (2005) version are available in 2000. Any recommendations as on an easy conversion? Thanks a lot. -Yubo It's not possible to easily/directly convert a SQL Server 2005 database to SQL Server 2000.  I learned this the very hard way.  My suggestion would be to find a new host.Terri MortonEngagement Manager, NeudesicHow to ask a question I have the same issue, in that I developed an ASP.Net 2.0 application using SQL Se...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi,Basically i built a webpage with Login and it's working well from my local machine.Right now, i'm using Database Publishing Wizard. the problem is how do i convert.MDF files to .SQL 2005 to get my database publish in the internet? thanks  Place your .MDF file in the App_Data directory, change the connection string accordingly and then publish your web site. ----------------------------------------------------------Please click Mark As Answer if this helped in solving your problem.  Please click "Mark As Answer" if this hepled in solving your problem. ...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf file...

Converting MDF files (SQL Server Express) to SQL Server 2005 WITHOUT having to buy SQL Server 2005 (I have Express). Personal WebSite Starter Kit
Hi (and HELP!),   I downloaded the Personal WebSite Starter Kit and got it working no problem on my local machine.  But I've had nothing but frustration trying to get it up and running on a webhosting site.  I picked hostmysite.com which uses SQL Server 2005.  I was under the impression that it wouldn't be that big a deal to convert the .MDF files that Sql Server Express uses to a SQL Server 2005 database.  I tried using SQL Server Management Studio Express.  I was able to "see" my remote database on hostmysite.com, but I was not able to import the .mdf files ...

Web resources about - check sql server 2000 or sql server 2005 - asp.net.sql-datasource

Server farm - Wikipedia, the free encyclopedia
A server farm or server cluster is a collection of computer servers usually maintained by an enterprise to accomplish server needs far beyond ...

Intel and Tsinghua University to Co-Develop Semi-Custom Solutions for Servers
At present, investors state that Intel controls 98% of the server processor market with its Xeon CPUs , but the server market is changing. Intel's ...

I just got a look under the lid of all the servers you use when you check your Facebook news feed
... drone Aquila, given demos of Oculus and Samsung VR, and we also got up close and personal with the bits of Facebook you rarely see: Its servers. ...

Clinton's server had emails beyond top secret level
The Inspector General recently updated Congress on the contents of the former secretary of state's home server

Review: Windows Server 2016 Technical Preview 4
In November, Microsoft released Windows Server 2016 Technical Preview 4. With the final release due out in the second half of this year, TP4 ...

Axelrod: Hillary Not Calling Private Email Server A ‘Mistake In Judgment’ Contradicts Apology
Axelrod: Hillary Not Calling Private Email Server A ‘Mistake In Judgment’ Contradicts Apology

Inventec to see server revenues grow 5-10% in 2016
Inventec is expected to see its server revenues grow 5-10% on year in 2016, buoyed by orders from the data center sector as well as branded server ...

Microsoft Strengthens Data Privacy With SQL Server 2016
The Dynamic Data Masking feature in SQL Server 2016 offers businesses another layer of database security.

AMD quarterly results show improvement, Zen will address 80 percent of server market
AMD's Q4 2015 figures are in, and they show some small improvements compared to what we saw in Q3 of last year. We also heard a few tidbits on ...

Qualcomm's Joint Venture In China Could Be A Game-Changer For The Server Industry
Qualcomm's ARM-based Server Demonstration at Announcement Event in San Francisco, October 2015 (Photo credit: Gina Longoria) China has become ...

Resources last updated: 1/28/2016 5:11:31 PM