Skip to main content

Posts

PL/SQL Stored Procedures and REF CURSORs

Introduction to PL/SQL Stored Procedures A stored procedure is a named set of PL/SQL statements designed to perform an action. Stored procedures are stored inside the database. They define a programming interface for the database rather than allowing the client application to interact with database objects directly. Stored procedures are typically used for data validation or to encapsulate large, complex processing instructions that combine several SQL queries. Stored functions have a single return value parameter. Unlike functions, procedures may or may not return values. Introduction to PL/SQL Packages and Package Bodies A PL/SQL package stores related items as a single logical entity. A package is composed of two distinct pieces: The  package specification  defines what is contained in the package; it is analogous to a header file in a language such as C++. The specification defines all public items. The specification is the published interface to a package. ...

Removing unnecessary ZEROs while converting decimal data type to string data type

Sometimes we will come across situation like, while converting decimal value to string, unnecessary '0' will be added to decimal value after decimal point like suppose I have decimal value 100.456 and I want to assign this value to one of my textbox, textbox with (currency) decimal number formatting. So value will be assigned to textbox like 100.4560. this is because of only conversion of decimal to string. So we can avoid this if it's really required as per project need by below line of code. decimal myValue = 100.456; textbox1.Text = myValue.ToString().TrimEnd('0'); I hope this logic will be helpful for all of us.....

Choosing between stub and shim types while Unit Testing using Microsoft Fake

Microsoft Fakes help you isolate the code you are testing by replacing other parts of the application with  stubs  or  shims . These are small pieces of code that are under the control of your tests. By isolating your code for testing, you know that if the test fails, the cause is there and not somewhere else. Stubs and shims also let you test your code even if other parts of your application are not working yet.

Creating package in Oracle Database using Toad For Oracle

What are Packages in Oracle Database A package is  a group   of procedures, functions,  variables   and  SQL statements   created as a single unit. It is used to store together related objects. A package has two parts, Package  Specification  and Package Body.

Creating Oracle stored Procedures using TOAD for Oracle

In a database management system, a  stored procedure  is a set of Structured Query Language (SQL) statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs. The use of  stored procedures  can be helpful in controlling  access to data, preserving  data integrity  and  improving  productivity.

Writing and deploying Windows Service in C#

What a Windows Service is Enables you to create long-running executable applications that run in their own windows session. Can be automatically started when the computer boots, can be paused and restarted without any user interaction. Easily installable by running the command line utility InstallUtil.exe and passing the path to the service's executable file.