I generated SQL Server 2008 Database scripts. There are total 80 objects. The script executes successfully from sql server query. But not from .NET. That is I want to create the objects (tables and stored procedures) from there.
If the database don't exist already in sql server, it fails. I have included the line
But it simply don't work and the process fails while the code perfectly works directly in SQL Server.
Any work around this? Can I run CREATE DATABASE somehow?
If the database don't exist already in sql server, it fails. I have included the line
Code:
IF NOT EXIST (DATABASE)... CREATE DATABASE DBNAME
Any work around this? Can I run CREATE DATABASE somehow?
Comment