Microsoft TSQL has select top records statement. How do you do it in Oracle PL/SQL?
TSQL:
select top(10) from tblStudents
PL/SQL:
select * from
(select IDStudent, FirstName, LAstName from tblStudents)
where rownum <10
Tuesday, March 23, 2010
Tuesday, March 16, 2010
Annoying ASP.NET postback - cursor on top
Scenario
Isn't it annoying that the mouse cursor is positioned to the top of the page for each post back. This happens to components that are not wrapped by a Ajax post-back and with control that has autopostback set to True.
Resolution
For .NET framework 3 and above, set the smartnavigation= true on the aspx Page declaration. Don't worry if the Page tag auto-complete doesn't give you the smartnavigation property.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Demo.Tricks._Default" smartnavigation="true"%>
Result
If a drop-down box at the bottom of the page is selected and post-back to the server, smartnavigation feature will re-position the cursor to where the post-back occurs. Brilliant!!
Window 7 Ultimate Aero preview does not work
Windows 7 user can preview the actual window when they hover their mouse over the application bar (at the bottom of the window). This is known as the Aero effect.
Problem:
The user can only see a rectangular box (no preview). Is my installation faulty? No.
Cause:
The Aero effect is not turn on by default for Windows 7 Ultimate edition. It depends on a window service called Desktop Window Manager Session Manager. The service is set to manual for default installation.
Resolution:
Set the "Desktop Window Manager Session Manager" start mode to "Automatic".
Step-by-step:
Problem:
The user can only see a rectangular box (no preview). Is my installation faulty? No.
Cause:
The Aero effect is not turn on by default for Windows 7 Ultimate edition. It depends on a window service called Desktop Window Manager Session Manager. The service is set to manual for default installation.
Resolution:
Set the "Desktop Window Manager Session Manager" start mode to "Automatic".
Step-by-step:
- Type services.exe into the Run textbox and press enter. This will open the window service listing.
- Locate Desktop Window Manager Session Manager service and right click on "Properties"
- Set the start mode to Automatic.
- For instance effect, start the service.
- Voila.
How to open network connections window
To open "Network Connections" window via command prompt
Type npca.cpl in Start->Run textbox (works with WinXP and Windows 7).
To open "Add Remove program" window via command prompt
Type appwiz.cpl in Start->Run textbox (works with WinXP and Windows 7).
Type npca.cpl in Start->Run textbox (works with WinXP and Windows 7).
To open "Add Remove program" window via command prompt
Type appwiz.cpl in Start->Run textbox (works with WinXP and Windows 7).
Subscribe to:
Posts (Atom)