Library tutorials & articles
SQL Distributed Management Objects
- Overview
- What is SQL-DMO?
- How can we use this stuff?
- The sample application
- Summary
The sample application
Let's create a simple ASP and SQL-DMO application that connects to a server, gets a list of stored procedures for a given database, allows you to modify the text, and finally applies the changes to the databases.
First, we'll create a simple HTML page called dmo.htm. This code
asks for the server name, database name, username and password. When submitted,
it will post the results to schema.asp.
|
dmo.htm
|
schema.asp connects to the database using the information specified,
and saves the login information using the Session object. Once connected,
it lists all the stored procedures in that database.
|
schema.asp
|
Next, we need to create a page that allows the user to edit the stored procedure.
We'll call it alter.asp. This simply connects to the database, and
provides a textarea displaying the contents of the stored procedure.
|
alter.asp
|
execute.asp simply saves these changes to the database again,
and tells the user that the changes have been made.
|
execute.asp
|
Related articles
Related discussion
-
how to find second largest number through a query in sql
by om_java2009 (29 replies)
-
High-Performance .NET Application Development & Architecture
by Manjot Bawa (0 replies)
-
Help with query and loop
by sara87 (2 replies)
-
Permutations and combinations of multiple return codes
by actuszeus (1 replies)
-
help needed on tree level sql?
by kareen (0 replies)
Related podcasts
-
Stack Overflow: Podcast #28
This is the twenty-eighth episode of the StackOverflow podcast, where Joel and Jeff discuss Windows Azure, SQL Server 2008 full text search, Bayesian filtering, porn detection, and project management — among other things. Jeff met the inestimable Joey DeVilla aka Accordion Guy...
Events coming up
-
Nov
19
SQLBits V
Newport, United Kingdom
SQLBits is Europe's largest SQL Server conference, and SQLBits V will be the biggest and best yet. On November 19th we are holding a day of pre-conference seminars; on November 20th we have a pay-to-attend day of SQL Server 2008 and R2 content; and on Saturday November 21st we have our usual free community conference.
I read your article and it is indeed an informative one. However I am having some serious problems creating a Job Schedule in VB.NET. I have managed to reduce the number of errors in the properties of the JobSchedule Object but I am still experiencing some difficulty...
You said you would help with any questions soI appeal to you for help!!
Regards,
Liselle
Thank you for this article I didn't know about DMO before,it was really important to me, I had the same problem I am working on a project and I have to give and solve problems from time to time , please write more about DMO
This thread is for discussions of SQL Distributed Management Objects.