browse by category or date

A few days back, a trackback was caught and held as a prisoner by Akismet. Since this is the first time I saw a trackback caught by Akismet, I spent a few minutes visiting the blog that sent the trackback.

Apparently the blog is indeed a splog. Basically it just grabbed the first 100s words from the blog post and published it there. A link to the original article also added at the end of the post. Quickly I judged the comment as a trackback from splog which the punishment is damnation to nothingness a.k.a. deletion. But after I clicked the Delete button, I pondered whether I judged fairly or not.

When I looked that blog for the second time, that blog actually never steal any content. It grabbed some words from the post, the post writer name also mentioned there, as well as the originated blog. It looks more like a blog aggregator than a splog.

To think of it, if we stripped out the commenting and digging/burying from Digg and replaced the user submitted summary into machine generated one, I think Digg will not stand out that far from the splog that sent me a trackback.

So does this mean we can make a splog, add few widgets, maybe build a mini community, and finally ‘legally’ called it a blog aggregator?

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:


Watched the movie last night at The Cathay with throng of friends (Yasrof and his wife Dhea, Hendra Gani, Buddie, Hafiz, Pak Cik Adi and Bro Hamonangan).

Despite the disappointment of few of my colleagues who have watched the movie earlier, claiming that the movie is a really good lullaby material, I was really sure that the movie is not a disappointing one. I mean, come on, the original story is so good. It would really need a massive amount of complacence to make this story into a bad movie.

In the end, I did enjoy the movie very much, thank you. So maybe in a way it follows that “Garbage in, Garbage out” postulate. If you already have a really good material, it would need a really major screw ups to make the output bad.

On our way out of the theatre, Hafiz shared to us his experience Harry Potter books. Bro Hamonangan also disclosed that he was discouraged by the thickness of the recent books. Then I am throwing my 2 cents, “Well.. I consider myself lazy. I would rather spent 2 hours to watch the movie than spending countless of hours reading the books.”

SPOILER ALERT
Lord Voldemort is actually Harry Potter’s alter ego!!!! Oh NO!!!

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.
You know that I am just kidding with you right?

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant:

SQL SMO (SQL Management Object) is a collection of assemblies that shipped together with SQL 2005. This collection of assemblies is all that you need to control your SQL Server. Be it SQL 2005, or SQL 2000, you can control/manipulate it programmatically using SQL SMO.

Since SQL SMO gave you the ability to treat the database elements such as Table, Database, Stored Procedure, and Trigger as an object, interacting with them should be relatively easy and practical. Additionally, you might want to check out this list of things that make SQL SMO exciting.

OK, lets get our hand dirty with the project. The first step would be importing the references into your project. If you use Visual Studio 2005, look for Microsoft.SqlServer.Smo in the list of .NET assembly when you open ‘Add References’ window.
If you already have MS SQL 2005 installed, you can find the DLLs in the SDKAssemblies folder of your MS SQL 2005 installation folder.
If you don’t have MS SQL 2005 installed in your computer, you might want to download the Express edition HERE.

Next, you could use the following code as reference.

using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using System;
using System.Configuration;
using System.Data.SqlClient;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            //Assuming that you include a Configuration file to your 
            //project and set the key 'DataSource'
            //as the connection string
            SqlConnection conn = new SqlConnection(
                      ConfigurationManager.AppSettings["DataSource"]
            );
           //Instantiate the connection to the server
	   ServerConnection dbConn = new ServerConnection(conn);
	   //Instantiate the Database Server Object
	  Server dbServer = new Server(dbConn);			

          //Traverse the Database Objects
          foreach (Database db in dbServer.Databases)
          {
              if (db.IsAccessible)
              {
                  //traverse the Stored Procedure Objects
                  foreach (StoredProcedure sp in db.StoredProcedures)
                  {
                      foreach (string str in sp.Script())
                          Console.WriteLine(str);
                  }
                  //Traverse the Table Objects
                  foreach (Table tb in db.Tables)
                  {
                      foreach (string str in tb.Script())
                          Console.WriteLine(str);
                  }
                  //Traverse the View Objects
                  foreach (View vw in db.Views)
                  {
                      foreach (string str in vw.Script())
                          Console.WriteLine(str);
                  }
              }
          }
      }
  }
}

Make sure in your app.config you have the DataSource key. You can follow this template for the configuration file:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>    
  <appSettings>
    <add key="DataSource" value="data source=db_hostname;initial catalog=db_name;UID=user_id;PWD=password"></add>
  </appSettings>
</configuration>

Have fun!

About Hardono

Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Possibly relevant: