This is the best solution of all. Others are either not functioning, have logical errors, or too complex. This is the most simple:
-----------------------------------------------
unit Unit1
interface
uses
DBGrids, Db, Controls, Windows, Messages,
type
NewControl = class(TControl);
...
private
procedure DBGridScroll(var Message: TMessage);
{ Private declarations }
public
{ Public declarations }
...
procedure TForm1.DBGridScroll(var Message: TMessage);
var
count : short;
begin
if (Message.Msg = WM_MOUSEWHEEL) then begin
count:=HIWORD(Message.WParam);
count:=count div 120;
DBGrid1.DataSource.DataSet.MoveBy(-count)
end else NewControl(DBGrid1).WndProc(Message);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
DBGrid1.WindowProc := DBGridScroll;
end;
couple of comments, documentations, experiences, and discoveries.. ofcourse, by yours truly.
Monday, May 26, 2008
Sunday, May 25, 2008
My new Sony NW-205F
Sony Walkman Series MP3 Player with Pedometer
Features: 2GB, 18 hrs batt life, digi-FM radio, water resistant, calorie counter, pedometer, stopwatch, presets, equalizer, normalizer, avls, power-saving, auto power-off, stylish design & lcd display, etc.
CNet Review
MP3NewsWire Review
Full spec
Features: 2GB, 18 hrs batt life, digi-FM radio, water resistant, calorie counter, pedometer, stopwatch, presets, equalizer, normalizer, avls, power-saving, auto power-off, stylish design & lcd display, etc.
CNet Review
MP3NewsWire Review
Full spec
Thursday, May 15, 2008
Solved problem: date format variance in MSSQL
Here's another problem I encountered in Microsoft SQL.
Hence I work for an international organization, different countries use different date formats therefore my applications should be flexible to handle different date formats.
when I change my date format at MS Windows regional settings from MM/dd/yyyy to dd/MM/yyy, all applications with date formats following windows settings should all change, especially Microsoft products.
As I check, all dates in the database changed but unfortunately, query does not. Query to MSSQL still reverts and uses MM/dd/yyyy. That's why I had problems with my applications. Its the engine's fault! I solved the problem by converting the date I passed on a SQL statement to the date format that the query uses.
This is why I hate Microsoft. Unfortunately I'm bound to my org's standards.
Hence I work for an international organization, different countries use different date formats therefore my applications should be flexible to handle different date formats.
when I change my date format at MS Windows regional settings from MM/dd/yyyy to dd/MM/yyy, all applications with date formats following windows settings should all change, especially Microsoft products.
As I check, all dates in the database changed but unfortunately, query does not. Query to MSSQL still reverts and uses MM/dd/yyyy. That's why I had problems with my applications. Its the engine's fault! I solved the problem by converting the date I passed on a SQL statement to the date format that the query uses.
This is why I hate Microsoft. Unfortunately I'm bound to my org's standards.
Solved problem: MSSQL can't be accessed by another host
I had another problem with Microsoft SQL. ODBC on my MS Windows XP can be accessed thru localhost but not by another host. My database is hosted on a PC/Server and should be accessed by another host on a network/environment.
ODBC / DSN error message:
Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
Duh?? What the?? I'm an expert but Microsoft sure knows how to make you dumb!
I already considered XP firewall settings, turned everything off.. I already have done almost all solutions found in the forums, including removing registry entries.
You know what fixed the prob? Simply add TCP port 445 on XP firewall advanced local area connection settings services. Port 445 is used by Windows for SMB over TCP.
Microsoft should consider commonly encountered problems and make easier solutions.
Compared to Interbase and MySQL, Microsoft SQL sucks! ....as always.
ODBC / DSN error message:
Connection failed:
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.
Duh?? What the?? I'm an expert but Microsoft sure knows how to make you dumb!
I already considered XP firewall settings, turned everything off.. I already have done almost all solutions found in the forums, including removing registry entries.
You know what fixed the prob? Simply add TCP port 445 on XP firewall advanced local area connection settings services. Port 445 is used by Windows for SMB over TCP.
Microsoft should consider commonly encountered problems and make easier solutions.
Compared to Interbase and MySQL, Microsoft SQL sucks! ....as always.
Thursday, March 20, 2008
Family First...
As I watch cable last week, I saw Adam Sandler's movie "Click" again. It never fails to remind me of my priority in life. Sometimes, Well most of the times, I plunge my self to work my goals, mission, and vision. The movie may be a fiction in some angles, but of course the moral of the story is the reality of most of us.
Problem with working in the government
I just recently learned when I was about to tender my resignation that a government employee will not receive any separation or gratuity pay unless he/she retires. I was used to have a back-pay upon my resignation. I even received about P2k for 6 months of work in SM. The government requires private firm to give separation pay and yet they don't? A government employee has privilege of early retirement on 15 years of service. 15 years??? That's bullshit! HR or personnel department should tell this during orientation because if a person doesn't have plans to grow-old and wait for retirement benefits in the government, then working with the government is JUST A WASTE OF TIME!
Batitong's DieCast Collection (inventory)
| No. | Manufacturer | Model | Color |
| 1 | Fiat | Stilo | Yellow |
| 2 | Peugot | 206cc | Blue |
| 3 | Mitsubishi | Pajero | Yellow |
| 4 | Honda | S2000 | Gold |
| 5 | Nissan | Micra | Orange |
| 6 | Mercedes-Benz | A-Class | Yellow |
| 7 | BMW | 120i | Red |
| 8 | Mercedes-Benz | Travego (Bus) | Black/Gray |
| 9 | Ferrari | F50 | Red |
| 10 | Ferrari | Super America | Red |
| 11 | Ferrari | F430 | Red |
| 12 | Ferrari | F2005 (F1) | Red |
| 13 | Mini | Mini Cooper | Green/White |
| 14 | Volkswagen | New Beetle | Dark Gray |
| 15 | Nissan | FairLady Z (2003) | Blue |
| 16 | Ford | Explorer Sport Trac (PickUp) | Orange |
| 17 | Lotus | Elise 111s (2003) | Yellow |
| 18 | Ford | F Series (1998) | Metallic Maroon |
| 19 | Mitsubishi | Eclipse Spyder (2007) | Black |
| 20 | Toyota | MR2 | White |
| 21 | Volkswagen | New MicroBus (2001) | Aqua Blue/White |
| 22 | Jeep | Grand Cherokee (2000) | Green |
| 23 | Toyota | Land Cruiser Prado | White |
| 24 | Audi | A2 | Light Gray |
| 25 | Lamborghini | Gallardo | Orange |
| 26 | Mazda | RX 8 | Blue |
| 27 | Jaguar | S type (1999) | Green |
| 28 | Land Rover | Range Sport | Maroon |
| 29 | Lamborghini | Murcielago | Yellow |
| 30 | Nissan | Micra | Black |
| 31 | Mitsubishi | Colt | Silver/Gray |
| 32 | Chevrolet | Tahoe | Dark Blue |
| 33 | Volvo | C70 (spyder) | Gray |
| 34 | Chevrolet | 3100 (1953) | Orange |
| 35 | Mercedes Benz | SLR McLaren | Black |
Subscribe to:
Posts (Atom)