Wednesday, June 25, 2008

Filter Background Not Showing Up
in RadGrid ASP.NET












The RadGrid Skin now uses RadGridMenu for the Filtiring dropdown. To modify an existing RadGrid Skin:

1. Set the Skin property of the RadGrid to an existing Skin name
2. Set the RadGrid property EnableEmbeddedSkins="False"
3. Manually create a link to the CCS on the page (or MasterPage) for both the RadGrid and RadMenu

Example:

<link id="RadGridSkinCss" href="~/Skins/Telerik/Grid.Telerik.css" rel="stylesheet" type="text/css" runat="server" />
<link id="MenuSkinCss" href="~/Skins/Telerik/Menu.Telerik.css" rel="stylesheet" type="text/css" runat="server" />

Now you can modify the CSS and make changes to the RadGrid.

Friday, June 20, 2008

Free Icon Creator and Editor

I love free software that is quality. Only 1.46 MB in file size for the download. The product is as intuitive as any graphic editor. Why can't Adobe include something like this in Fireworks?

IcoFX (http://icofx.ro/)
An award winning freeware icon editor. It is an all-in-one solution for icon creation, extraction and editing. It is designed to work with Windows XP, Windows Vista and Macintosh icons supporting transparency.

And if you don't have a free graphic editor yet...

Paint.NET
http://www.getpaint.net/

SQL International Date Format
(Insert / Update)

You will run into problems with SQL insert and updates if an application is hosted under a different regional setting than your development environemnt. To resolve this issue, if you are creating a string SQL statement then format the string as follows:

yyyy-mm-ddThh:mi:ss[.mmm]

Another option is to use parameterized queries.

Tuesday, June 17, 2008

Oracle Deleted DAT File
Failed Server Startup

It makes perfect sense...right? If you are a Database Server and you can't find a .DAT file, don't start the server. Make me jump through hoops to get the server back up and running. Here's the error message:

Errors in file d:\oracle\product\10.1.0\admin\server\bdump\server_dbw0_352.trc:ORA-01157: cannot identify/lock data file 21 - see DBWR trace fileORA-01110: data file 21: 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\SERVER\DATABASE_NAME'ORA-27041: unable to open fileOSD-04002: unable to open fileO/S-Error: (OS 2) The system cannot find the file specified.

Here's the solution:

http://www.mydigitallife.info/2007/08/04/how-drop-tablespace-and-recover-oracle-database-when-accidentally-delete-datafile/

Tips for Connecting
  1. Launch SQL Plus using '/nolog' in the command line. You can also right-click on the SQL Plus shortcut and add ' /nolog' to the executable path.
  2. Type: 'conn sys as sysdba'
  3. Enter your password

Monday, June 16, 2008

Display Server Information on the Desktop

Background Info is a small application you place in your StartUp folder to display server information on your desktop. It comes in handy when you manage a number of servers through Remote Desktop, and you need to know which server you have remoted into (it can be confusing sometimes).

http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx

Here is my sample BgInfo configuration:

***************************************
<Host Name> SERVER (User: <User Name>)

IP Addresses: <IP Address>

Free Space: <Free Space>

Volumes: <Volumes>

CPU: <CPU>
Memory: <Memory>

OS Version: <OS Version>
Service Pack: <Service Pack>

MAC Address: <MAC Address>
***************************************

Note: It is probably best to place the .exe in a location like C: and a shortcut to the .exe in the Startup folder. Save out your configuration (bgi). Then you can add the parameters to the shortcut as:

C:\Bginfo.exe C:\bginfo.bgi /SILENT /timer 0

This will start the application without the timer window and shut off all error messages.

Wednesday, June 11, 2008

Update One Oracle Column with the
Data from Another Table

The Good Oracle Update

UPDATE TABLE_A SET COLUMN_A = (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)
WHERE EXISTS (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)

The Bad Oracle Update
(unless you want to wipe out the data in TABLE_A.COLUMN_A when there is no match)


UPDATE TABLE_A SET COLUMN_A = (SELECT TABLE_B.COLUMN_B FROM TABLE_B WHERE TABLE_A.COLUMN_A = TABLE_B.COLUMN_B)

Sunday, June 8, 2008

Microsoft Windows XP Professional Version 2002 OEM
Serial Number Location

I bought Microsoft Windows XP Professional SP3 English for System Builders 1 Pack CD - OEM from Newegg http://www.newegg.com/Product/Product.aspx?Item=N82E16832116515

After opening the product and throwing away the wrapper, I started the installation and then looked for a license key. I couldn't find it anywhere! That's because Microsoft put it on the cellophane wrapper which was in my trash.

I happened to find the answer on Mac-Pro

http://www.mac-pro.com/Microsoft-OEM-Windows-XP-2002-Pro-DSP
After receiving your copy of Windows XP be careful not to throw away the "product key," which is printed on a sticker affixed to the outside of the software's cellophane wrapper. You will need the product key in order to activate the software.

C# Maximum DateTime

12/31/9999 11:59:59 PM

ASP.NET Task Scheduler:
Windows Service / Web Service or Web Page


















The C# (Visual Studio 2008) solution is here:

The application works. You will have to download the source code, re-import your service method and re-compile. I will work on the project when I have time to make it easier to implement, but it provides a good start towards a solution.
Since the Web Service and re-compilation made it more difficult, I thought I could simplify by making a call to a Web Page instead and use the Page_Load event. I tried to use the WebClient object which worked from a Windows Form but would not work from a Windows Service, even with Administrative privledges. I ended up using some code from a site:


Stream str = null;
HttpWebRequest wReq = (HttpWebRequest)WebRequest.Create("http://www.site.com/tick.aspx");
HttpWebResponse wRes = (HttpWebResponse)(wReq).GetResponse();
str = wRes.GetResponseStream();

I was experiencing a error:

The operation has timed out
You must call either the Stream..::.Close or the HttpWebResponse..::.Close method to close the stream and release the connection for reuse. It is not necessary to call both Stream..::.Close and HttpWebResponse..::.Close, but doing so does not cause an error. Failure to close the stream will cause your application to run out of connections.
So, I added...

str.Close();
str = null;
wRes.Close();
wRes = null;
wReq = null;

It works....


Added 8/25/2008
I zipped up the Source which can be found in this folder:




Saturday, June 7, 2008

Windows Service:
Path to Executable

Working on a Windows Service, trying to get the path to the executable which is displayed in the properties of the service as "Path to executable:"

using System.IO

string pathToExecutable = System.Reflection.Assembly.GetExecutingAssembly().Location;
FileInfo fileInfo = new FileInfo(pathToExecutable);
string pathToConfig = fileInfo.DirectoryName + @"\Configuration.xml";

Check This Out!

More Links to Good Information