Thursday, February 28, 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.


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 record selection or joining, and then passes the result to the application. Driver connections for Progress requires a client product such as Client Networking, 4GL Client, or ProVision to connect to the database, or use its own network protocol for a remote database. The Progress client is responsible for getting the records to the driver where it does the rest of the work. Starting in Version 8, executables separate from the full Client Networking product are shipped for establishing this connection. This smaller client is referred to as the Open Interface Driver and is combined with the Open Interface Broker for multi-user situations.
Multiple Tier
Queries are offloaded by the driver to another application in multiple tier architectures. This secondary layer is generally a networking program talks to a server side component. The server receives SQL requests from multiple network connections, resolves the request through interaction with the database, and returns the data to the PC’s secondary layer. The secondary program must still pass the final results to the driver. While it is not required, almost all multiple tier implementations make direction connections from the server to the database. The server side execution generally provides better performance since only selected records get passed to the client PC. Under Progress Client Networking, records are sometimes passed to the PC for selection, increasing network traffic. The specific circumstances where this happens are version specific, but joins for example, are determined by the client PC under all current versions of Progress.
JDBC and ODBC to JDBC Bridges

If you’re programming in Java, there is a standard similar to ODBC for Java. JDBC drivers are also available for Progress. They are generally of two different types, true JDBC drivers and ODBC to JDBC Bridges.

True JDBC involves your Java program making a connection to a database over a URL. ODBC bridges work the same way from the program side, but connect locally through the PC’s ODBC driver. The database can still be remote, just the ODBC must be set up locally.

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 content, and not the gimmicks? Go to Tools-Internet options-Advanced and turn off pictures; sounds, animations, videos and couple it with powerful ad blocking/filtering software like Naviscope where you can even block out backgrounds, JavaScript, just about anything. Ah, clean pure content finally.

4.) Use keyboard short cuts, they are faster, simpler and make you look like a surfing pro. Our favorite Keyboard shortcuts - F5 - Refresh Alt-D - Address bar F4 - Shows typed address Ctrl + W - Closing current window. Esc - Stop loading a page. F1 - Help Alt + Back arrow - Previous webpage F11 - Full screen.

5.) Go to Tools-Internet Options and increase Temporary Internet files - settings to as much as you can.(Don't worry, if you have 4.5 GB hard disk)

6.) Removing MS IE as the default Internet Browser Whenever you install a Web browser, it begs you to let it become your default browser, and it repeats this plea until you make a decision. What if, after using one browser for a while, you want to switch? You can change your mind, but it's much easier to do so in Internet Explorer than in any version of Navigator. In IE 3.x and 4.x, select View, Internet Options, click the Program tab, check the box labeled "Internet Explorer should check to see whether it is the default browser," and then click OK.

7.) Install IE Webtools , wallpaper and lots of fun things. ( Microsoft Web Developer Accessories, toolbar wallpaper, explorer bars and lots more. Why doesn't Microsoft ship these goodies along with the browser, or integrate them into the browser?

8.) Change the boring toolbar wallpaper ( Customize the toolbar, the way you want. Change the look and feel with toolbar skins or right click on the toolbar and Customize. Add/remove buttons, shortcuts, keep separators do just about anything, and keep only the buttons you need on the toolbar.

9.) Microsoft makes Windows98 crawl with its browser integration. Though it gives you more features but then you trade-off performance. Don't believe Microsoft when they say you can disintegrate IE5 from windows. Even we couldn't. To the rescue comes this nifty 113 KB ripper. Download it and break away from IE. IE-off.exe is what we recommend.

10.) Taking printouts of webpages is a big pain with all the banner ads/links/frames/tablets etc right? Just select the text (with images) on the webpage you want by highlighting it, and right click on the selected text - print - and in the print-range option tick on "selected " and print-it. You get just what you want. It saves paper and your precious printer cartridge.

11.)A good way to keep track of your printed Web pages is to include date and time information in the header and footer. To do this, choose File, Page Setup. When the Page Setup dialog box opens, you can enter the information codes that you want to use in the Header and Footer boxes. Let's say you want the date and time in the footer. Click the Footer entry box and type &t &d into the field. We suggest using at least two spaces between &t and &d to separate the time and date on the printout. After you enter the codes, click OK to close the dialog box and save your changes. These changes will remain in effect until you change them again. Add these to your Header and Footer entries for better control over your printouts:

12.) I.E5 comes with some default favorites folders, which we don't think are good. Before you start surfing and start piling up hundreds of favorites create favorite folders based on your interests. Like say, Webmail, Fun, Personal, Business, Movies, Shopping and maybe an Etc folder. Depending upon the webpage you see, add it to your corresponding favorite folder. So you don't have organized them later.

13.) Do you use several machines for surfing or have a notebook and having a problem trying to use the same bookmarks and cookies? We have a solution at hand. Get a floppy, insert into your drive and go to File-Import-Export follow the wizard and copy (Export) all your favorites, cookies or only a selected few and the works into a floppy (they all fit in, don't worry),.And carry the floppy around. No matter which machine you use to surf, just insert the floppy pick up (Import) the cookies/favorites you need and get your work done. Also check out or another neat new services for storing your favorites online. No matter whether you surf from a cyber cafe, from your office PC, home PC or your notebook all your IE treasures are intact.

14.)Dozens of bugs, some of them potent are reported every month from Internet Explorer. Click on Tools- Windows update and install the necessary ActiveX updating controls, and update your browser at regular intervals, and check out sites like and ZDNet's updates for the latest patches.

15.)Tools-Internetoptions-Content-Autocomplete. This takes care of filling up those boring forms, alternatively you can also check out Gator (, another software that does about the same job but with more features, and also check out the Profile assistant and Microsoft wallet, which could help you while shopping. We recommend you log into (a Microsoft venture) and help yourself.

16.) Surfing through an interesting page, want to share it with friends. You don't need to save it or copy the page, open Outlook express and send it. Time consuming. Instead use File- Send page by email/send link and I.E 5 will take care of sending it. Just make sure your email client is properly configured. Or want to save the webpage but the PC isn't yours or you don't have floppy, just email the page to your webmail account and pick up the webpage or URL from there or send it to those free online hard disk providers like, etc.

17.) Install Netscape 4.7, its pretty good and a nice alternative. Or try the lightweight Opera 3.6 or even better install Neoplanet 5.1, it runs on the I.E 5 engine, with its skins looks cool and stylish and does all the things that I.E 5 does and it look sober and boring. Or you can check out Netcaptor which also runs on the I.E engine and offers additional neat features. Wake up, there are lots of good, if not better alternatives out there

18.) Any browser crash can make Windows unstable. The severity ranges from an app going belly-up to Microsoft's dreaded Blue Screen of Death. If the culprit is Navigator, you can bring up the Close Program dialog box by pressing Ctrl-Alt-Delete, selecting Netscape, and clicking End Task. But doing this can cause other open programs to fall like dominoes, so you might want to bite the bullet, close all running apps, and restart. IE 4 offers another option. Do it before you hit your next crash, and you'll save yourself serious headaches. Click View, Internet Options, click the Advanced tab and check "Browse in a new process." This makes IE handle Web browsing as a task separate from other system functions, so the next time IE 4 hits an iceberg, it shouldn't take Windows down with it.

20.) Don't want others to know where you are surfing? Remove favorites from the startup menu - use a tweaking tool like Xteq systems. Use a browser washer, which washes all the cookies, history and traces of your nefarious surfing activities. Every time you visit a Web site, Internet Explorer stores history and cache information in files that have the .dat extension. The more data these files have to store, the bigger they get. Though Microsoft won't cop to it, clearing the Cache or History folders in IE 3.x and 4.x doesn't always return these files to their original default size of 8KB, 16KB, or 32KB. You can see for yourself by opening a DOS prompt (select Start, Programs, MS-DOS Prompt), navigating to the directory where your Cache or History resides (c:\windows\tempor~ or c:\windows\history), and then looking for the .dat files. If you open them, you'll see all of your "deleted" URLs. The problem? Aside from the fact that these .dat index files let snoops track where you've been surfing, IE begins to slow down when the files reach approximately 200KB. And once they reach 500KB, the program starts crashing. One solution is to delete both files, but you have to do it in DOS, not Windows. Select Start, Shut Down, Restart in MS-DOS mode. At the C:\> prompt, type deltree c:\windows\history, and then press Enter. (In IE 4.x, this path could be c:\windows\profiles\yourname\history.) Then type deltree c:\windows\tempor~1 and press Enter. (This process can take 15 minutes if the .dat files are large.) The next time you fire up your browser, both files will be rebuilt as empty .dat files. Feeling insecure online, IE 5 alone might not do a good job. Wipe out all your private data, manage file size and kill all "that" data in Cache, History, and .dat files by using the $15 shareware program TweakIE. Its IESweep feature clears your Cache and History folders and resets the .dat files to their empty size. This utility also alerts you when .dat files have grown big enough to affect your browser's performance.

21.) Internet explorer serves both as an explorer for the Internet and windows. You can do just about anything from the address bar of I.E 5. For starters -- · Send an e-mail message: Type mailto: followed by the address--for example, Even Netscape Navigtor does this. · View your desktop: Type desktop. · Open My Computer: Type my computer, or the name you gave to My Computer. · Start a DOS prompt: Type c:\ · Open a folder: Type its path name--for example, c:\text. You'll get a directory listing of the folder. You can open some files from here, too; and by clicking the down arrow, you can find and launch commands you've recently typed. This also works in Navigator. You can speed your way to Web and FTP sites by clicking the Windows Start button and then selecting the Run command. In the dialog box that appears, type the URL or FTP address. (You can even type the subdirectory and name of the file you want to download, such as Click OK. Windows will dial your Internet service provider, load your browser--either Netscape's or Microsoft's, whichever is the system default--and head to the site.

22.) Wacky eggs, easter eggs. Whodunit? Want to see who created I.E 5.0? Psst..this doesn't work in I.E 5.01 but does in 5.0/4.0 1. Open up Notepad. 2. Type " " (no quotes) 3. Save the file as "test.htm" (no quotes) 4. Open up "test.htm" in IE 5 And see the credits roll-by, and try counting the number of heads, which went into IE 5. PS - The same thing works in Outlook 4.

For Outlook -- 1. Click the Compose Message button, and make sure that Rich Text (HTML) is ticked. 2. Now click in the main body to make the formatting bar come to life 3. Click in the Font selection box and type in "athena" and press enter 4. Go back into the main Outlook Express program and click on "Outlook Express" at the top of the folders list 5. Click an empty space on the page that appears and type about to see the names of the OE team fly on to your screen!

1. Open up IE5 2. From the menu, select Tools > Internet Options > General (tab) > Languages (button) 3. Press 'Add' 4. Type: "ie-ee" (without the quotes) and click 'OK' 5. Move "User Defined [ie-ee]" to the TOP of the list 6. Exit back to where you can browse in IE5 again 7. Click on the Search icon (to pull up the side search menu) 8. Laugh at the new options 9. Select 'Previous Searches'

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 3.5 at compile time expands and generates code (in target output file) as seen in first (more verbose) implementation above.

So obviously when you have need of simple assignment and retrieval of values this feature is quite useful as it makes code short and more clean for readibility. you may also apply attributes to Auto Properties eg.

public class Employee
[Obsolete("Changed to ...",true)]
public string EmpName { get; set; }
public int Salary { get; set; }

Also to make property as Readonly or WriteOnly you can add access modifier (private) next to the set or get. This allow you to internally modify the member, while publicly providing "read only" or "write only" access.

public class Employee
public string EmpName { get; private set; }
public int Salary { get; private set; }

public void method1()
EmpName = "Jignesh"; //allowed
Salary = 100000; //allowed

private void Form1_Load(object sender, EventArgs e)
Employee x = new Employee();
x.Salary = 2000; // Not allowed.

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("return false;}")
s.AppendLine("else return true;}")

s.AppendLine("if (document.images){")
s.AppendLine("for(i=0;is.AppendLine("document.images[i].onmousedown = ProtectImages;")
s.AppendLine("document.images[i].onmouseup = ProtectImages; }}")

ClientScript.RegisterStartupScript(Me.GetType(), "ProtectImages", s.ToString(), True)
End Sub