Microsoft SQL Server Script always returns SUCCESS

Interested in developing new plug-ins? Got one to share? Post here!
Werner
Posts: 8
Joined: Fri May 13, 2011 12:08 am

Microsoft SQL Server Script always returns SUCCESS

Postby Werner » Thu Dec 06, 2012 3:59 am

Hi,
I want to test, whether a Database with a DBName entered by user already exists in the SQL Server instance.
So I created a simple SQL Server script "USE $DBNAME$"
When I execute this Statement in MS SQL Server Management Studio I correctly get an error message when the database does not exist.
But when I execute this in a "Microsoft SQL Server Script" in IA then I always get a result "SUCCESS".

Also when I execute other scripts (eg. "CREATE DATABASE .." or "CREATE TABLE .. " etc.) I get error Messages in MS Management Studio if those objects already exist; from IA I always get SUCCESS.
(If the objects don't exist then the script is executed correctly and I also get SUCCESS).

-> From IA I can't determine whether an SQL script has been executed correctly or if there were errors on execution.

Am I doing something wrong or missing something ?

Regards

Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 2 guests