I will say ...

I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.

Wednesday, December 16, 2009

Overview of SQL Server Stored Procedure.

When you need to store or retrieve data that is accessing and manipulating data within a database is a rather straightforward operation in SQL server database, and so we will go for T-SQL with four simple commands – SELECT, INSERT, DELETE, and UPDATE, and perform all the required tasks. The skill in working with databases lies in being able to not just work with these commands, but also complete each unit of work efficiently.

We will cover the different types of stored procedures used in SQL Server and their usage. We will also examine the working of stored procedures, the potentially tricky areas, and how to avoid them.

To increase performances, every developer should consider a number……….

Click to view the article.

How Do I Protect My Stored Procedure Code.

Every developer is exceptionally concerned about how she/he can formulate the best security of her/his SQL code object like a view / storedProcedure as well. For this reason, we will go for encryption. Encryption is a good but not utterly tenable process. In this article, I would like to show you some best practices to protect SQL server code object.

Click to view the article.

Get List of Extended storedProcedures that are Allowed to you for Common Use.

How many extended storedProcedures do you have the permission to use as public in your own SQL queries / storedProcedure as well? This simple article will show you all the extended storedProcedures allowed to you for common use.

Click to view the article.

Procedure to Shrink the Database Transaction Log.

Occasionally, you might need to conduct database maintenance whether you have the pre-packaged MSDE or the full version of SQL Server. This maintenance should be conducted after you have deleted large amounts of data from the database (Example.mdf and Example_log.ldf). Usually this occurs if you delete a large number of events from the event log. Even after data is removed, the .mdf and .ldf files need to be compacted (similar to an Outlook *.pst file after deleting emails) in order to recover disk space and increase efficiency, and also to reduce seek time.

This article will demonstrate the procedure to shrink the database transaction log.

Click to view the article.

How To Read File Attributes using OLE Object with SQL Server.

It is not necessary that developers must use a .NET class library for getting file attributes information when the application is completely based on DBMS. It is always better to use the standard techniques provided by SQL Server where possible. SQL Server provides several “standard” techniques for file manipulation based on the use of the FileSystem Object (FSO).

This article will demonstrate how we can read file attributes using OLE Object with SQL Server. Here are a number of T-SQL Stored Procedures, based on the use of the FileSystem Object (FSO) that may just get you out of a tight corner.

Click to view the article.

How Many Records Are There in your Database?

How many records are there in your database? You might be thinking that you need to write a gigantic SQL statement for that. This article will demonstrate to you, how easily you can do it.

Isn’t it interesting?

Click to view the article.

Get SQL Database Table Information.

Couple of days ago one of my friends asked me that, why we always use ADO.Net class library to get any SQL Tables information runtime! SQL Server provides several “standard” techniques for it. So I decided to try it and I found it’s really cool and I believe that it is always better to use the standard techniques provided by SQL Server where possible.

This is easy enough to do with cursors and dynamic SQL, but after looking at how “sp_ spaceused” worked and how SMO gets the same information, I decided that I could write it without either.

Even better, once I wrote it though, I realized that it could easily be rewritten as a StoredProcedure, now I could reuse it by joining it with other tables and views in new queries or procedures whenever I wanted.

This article will demonstrate how we can view the Table information of SQL server database.

Click to view the article.

Reading Files in SQL Server Using Transact-SQL.

SQL Server provides several “standard” techniques for file manipulation but, sometimes, they aren’t quite up to the task at hand – especially when dealing with large strings or relatively unstructured data. Here are a number of T-SQL Stored Procedures, based on the use of the FileSystem Object (FSO) that may just get you out of a tight corner.

Click to view the article.

How To Store Any File into SQL Database.

Recently I completed a project where I need to store various files, i.e. Microsoft Office file formats, PDF, Images, etc.). When I started writing code, I wrote a function to store binary data, after that I thought why not use direct bulk insert from a SQL Server StoredProcedure.

This is just a simple article to store any file format into a SQL server database.

Click to view the article.

How to Integrate an OLE Object with SQL Server v2.

If you read some of my CodeProject.com articles, probably you know that I’m not very much bashful to share with you, what I learned? Actually if I found something interesting I will always try to share this with you. I m not well experienced on article writing, but I try because of the wonderful knowledge sharing platform of CodeProject.com; I hope that everybody will be agree with me that the CodeProject provide us an excellent platform to share knowledge’s.

Before I start about this article in detail, I would like to share a little incident; few month’s ago, I was working to update an ERP system, where I found a huge bugs of Transact-SQL and table design; Most of the time the system fail to process data transaction. To find out the reason I assign one of my team members. After few days he report me that some of the main reasons are data type mismatch, data conversion error, stored procedure parameters issues etc. So we decided that at first we have to find out the sources of the error and the types of error as well. So the question is how we can achieve this?

Click to view the article.

How to Integrate an OLE Object with SQL Server.

When we need to store or retrieve data in SQL server database, we will go for T-SQL. But the thing is how can we integrate T-SQL with an external application? For example, we want to integrate SQL server with Microsoft Word, Excel or Microsoft exchange server as well. So how can we achieve this?

This article will demonstrate how we can integrate T-SQL with an external application.

Click to view the article.

Spell checking in Microsoft Access 2003 applications.

For various automation type applications, Microsoft Access is widely used for database and user interface design. In this article, I would like to show you how to do spell checking in Microsoft Access 2003 applications……….

Click to view the article.

How to set an appointment using Microsoft Office Outlook 2003.

Sending an email using Microsoft Outlook 2003 is nothing original for most of the VBA developers. It is a very common and also a very good practice. I hope that the most of the VBA developers is very much familiar with this one. This article is not about to send an email from customized Microsoft Office Applications using Microsoft Outlook api; It’s about how to place / set an appointment using Microsoft Outlook 2003 api.

Click to view the article.

How to get mobile information using VBScript.

I created a WAP application for getting information about mobile hand set models and their vendors and store it in a simple text file. At first, I decided to create an application using Java, but the problem is that people need to download and install the application; finally, I decided to create a simple WML encoding ASP page.

This article will show you basic user agent / mobile capabilities (mobile model, vendors etc.,) profiling using simple VBScript.

Click to view the article.