Posts

Showing posts from February, 2008

ODBC Secrets

What is ODBC? ODBC stands for Open Database Connect and is a Microsoft specification. ODBC provides a standard way of defining data sources and their data access methods. ODBC is designed around SQL and relational databases, but there is nothing preventing translation of the incoming SQL to another language. The ODBC specification defines low level API calls that any application can make use of for database queries. By writing calls to the API, a reporting writer or other tool can portably access heterogeneous data sources with one set of source code. Architectures There are two basic architectures employed by the driver makers: single vs. multiple tier. Intersolv’s DataDirect ODBC, OpenLink Lite, and the Progress ODCB Driver are single tier drivers, while the rest are all multiple tier. Single Tier Single tier architectures use the driver itself to process the SQL query, implying PC side resolution. The driver connects to the database, sends SQL to the database, does any additional re

23 IE 5 Secrets

23 IE 5 SECRETS!!!. 1.) Do animated graphics, banner ads distract you from your surfing experience ? Once the page loads, just press Esc and presto, everything faintly flashing comes to a grinding halt. This might not work for Java applets and flash animations. 2.) Finding your 14/15-inch monitor too cluttered with all the toolbars, banner ads, taskbars overshadowing the precious real-estate space on the webpage? Simple. Press F11 (for full screen) and go to Start-Settings-Taskbar and click on autohide. Presto your webpage, blows up and surfing becomes more fun, and your 14'' inch turns into 20" inch monitor, well almost. You'll find reading the webpage a much more pleasurable experience. Plus - Right click on the IE 5 toolbar and customize. Here in the dropdown menu remove the text label options and select Small icons instead of the default large icons. Presto, do all this and your browser window just blows up and surfing suddenly becomes a pleasure. 3.) Just want con

C#.NET 3.5 - Automatic Properties

Automatic Properties There is no. of new features introduced in C# to enable developers to write simple and short code. Properties is best when we want to control or validate values to be stored in fields/members, Many a times in order to grant access to private fields of class we declare appropriate public properties. So we declare it as public class Employee { private string _EmpName; private int _Salary; public string EmpName { get { return _EmpName; } set { _EmpName = value; } } public int Salary{ get { return _Salary; } set { _Salary = value; } } } With automatic properties we need not provide full definition of property, In fact compiler generates default definition which is simple assignment and retrieval of values. if you wish to add you own logic then automatic properties is not for you. public class Employee { public string EmpName { get; set; } public int Salary{ get; set; } } Above code in C#.net 3.5 at compile time expands and generates code (in target output file) as seen

Block images on the page from being copied

Recently my client wanted to block images on the page from being copied. So we wrote a standard script to trap and block right-click on a page. But he did not wish to block entire page, he wanted users to copy unique Itemcode and a couple of other unique items on the page for correspondence. Well we can decided to block right-click only for images This is how we ejected a client script to achieve the task. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim s As New StringBuilder() s.AppendLine("function ProtectImages(e) {var msg = 'Warning: Image is copyrighted.';") s.AppendLine("if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2){") s.AppendLine("alert(msg);") s.AppendLine("return false;}") s.AppendLine("else return true;}") s.AppendLine("if (document.images){") s.AppendLine("for(i=0;i s.AppendLine("document.images[i].onmous