Desktop Programming

Description

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)

------------------------------

ADDITIONAL INFORMATION:

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.
1)
a^=b^=a^=b

2)
a = a # b
b = a @ b
a = a @ b
(Not works in C)
3)
In Ruby
a,b = b,a
4)
In PHP
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:
http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B