Desktop Programming


C, C++, VB, VB.NET, JAVA etc.,

Unable to rename a database in MS SQL Server Management Studio

Submitted by Divya on Jun 28, 2013 - 07:36

I am using MS SQL server 2008, unable to rename a database... I closed all the applications. But could not able to rename. 
The error message appears as 

TITLE: Microsoft SQL Server Management Studio


Unable to rename testdb1. (ObjectExplorer)



Rename failed for Database 'test'.  (Microsoft.SqlServer.Smo)

Swap two variables

Submitted by Karthik on Jan 09, 2011 - 20:24

stuartjems Wrote: Hey all
I have one problem and i am trying to find solution of that .
"swap two variables without using third temporary variable"
If anyone know then please let me know!

Following methods available:
I had tested some of the methods below in C, C++.
But, nothing works in vb.

a = a # b
b = a @ b
a = a @ b
(Not works in C)
In Ruby
a,b = b,a
list($a, $b) = array($b, $a);

Difference Between C++ and Java

Submitted by Karthik on Jan 09, 2011 - 20:22

C++ is developed for system programming. So C++ will be used to hardware programming. Java was created initially to support network computing. Java is a statically typed object-oriented language that uses a syntax similar to C, but is not compatible with it.

C++ exposes low-level system facilities.
JAVA runs in a protected virtual machine (JVM) only.

To know the complete difference go to the following link: