Friday, June 29, 2007

Google Search Trick

This is a pretty simple search trick that makes it very easy and efficient to search for files that are often more difficult to find.


Cool Google Search Trick - Watch more free videos

Friday, June 15, 2007

How To Milk A Horse

I can't comment anything to this....Just watch and laugh!!!
And!
Please Don't Try This At Home !!!!

Monday, June 11, 2007

Syntax error: Missing operand before 'Like' operator

I am currently developing a 2 way SMS interface (Demo version) FYI, I am doing pre-sales IT as well. #@%#^$&%&%^&
Basically I have developed the architecture and out of my surprise it doesn't give me much problem.
But I will keep posting some minor bugs of my program and will try my best to solve it.

This is the code I am "trying" to execute which is trying to filter a Binding Source using a ComboBox Value:

bsReceiveSMS.Filter = "Like Message = '" + cbDepartmentCode.Text + "%'";
Error received : Syntax error: Missing operand before 'Like' operator
-----------------------------------------------------------------------------------------
Solution:
//Code
string filter = String.Format("{0} LIKE '{1}%'", "Message", cbDepartmentCode.Text);
bsReceiveSMS.Filter = filter;
-------------------------------------------------------------------------------------------

Friday, June 08, 2007

Bug buster blog!!

I am going to transfer my blog to a so call Bug buster blog!
Frustrated to see lots of bug in my program, popping out every where in every minutes or even seconds...
The first stupid bug is
"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."

Well, basically this error message tell you NOTHING...one of the useless error message by Visual Studio 2005....
Okie, after I google this error message and found this useful LINK
So by putting this below function into the try and catch function:
-------------------------------------------------------------------------------------------------------------------------------------
[C#] 
private void PrintAllErrs(DataSet myDataSet){
DataRow[] rowsInError;

foreach(DataTable myTable in myDataSet.Tables){
// Test if the table has errors. If not, skip it.
if(myTable.HasErrors){
// Get an array of all rows with errors.
rowsInError = myTable.GetErrors();
// Print the error of each column in each row.
for(int i = 0; i <>
foreach(DataColumn myCol in myTable.Columns){
Console.WriteLine(myCol.ColumnName + " " +
rowsInError[i].GetColumnError(myCol));
}
// Clear the row errors
rowsInError[i].ClearErrors();
}
}
}
}

-------------------------------------------------------------------------------------------------------------------------------------
It tell you what's went wrong, rather then give you an useless error message