473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Executing SQL Server Management Studio Scripts

If you create scripts in SSMS, how do you execute them from code ?

The SqlConnection Open() statement works OK, but the SqlCommand.ExecuteNonQuery
fails on the first line
use [Databasename]
saying it cannot find the database.
May 6 '06 #1
0 764

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil | last post by:
Hi, I have my create statments for tables, procedures, views, etc in individual Transact-SQL script files (.sql). I wnat to write another script file that executes these scripts in the...
0
by: Lyle Fairfield | last post by:
SQL Server Management Studio Express CTP is a freely downloadable utility (http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4- 455e-a2d6-1d4c98d40f6e&displaylang=en) something...
10
by: amjad | last post by:
how to connection sql server table with aspx like pulling data from table to grid view.... simple example to start .... thanks
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
1
by: Alex | last post by:
Hi Everyone, Most of our MS SQL Servers are still running on SQL 2000, but being I will soon be upgrading my workstation to Vista Business I'd like to install MS SQL 2005 Enterprise Manager to...
0
by: hi4murali | last post by:
Facing a strange error in MS SQL Management Studio 2005, when trying to open a new query window, open a table to view data or even run and existing SQL query file. The error text is: An error...
2
by: Robert | last post by:
I'm a newbie trying to find the SQL Server Enterprise Manager so I can create a database. I have installed SQL Server 2005 Express and SQL Server Management Studio Express. On the SQL Server menu...
12
by: helveticus | last post by:
I'm in the process of finalizing my site. I spent quite a bit of time designing content pages and would like to cut on development time by simply managing the DB (SQL server, evt. MySQL) via MS...
1
by: bill | last post by:
Here's a question about getting the most out of the interface when executing SQL in the interactive window of M In TOAD (a popular front end for Oracle by Quest Software), the equivalent of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.