22 May
Posted by Jayce as Programming - 506 views
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.
Do you face this error during SQL query in C#? Fear no more, my friend. All you need to do is put the timeout period more then default value - CommandTimeout. Follow the code below…
SqlConnection EDCConnectionString = new SqlConnection(”ConnectionString”);
EDCConnectionString.Open();
string SQLTesterStats = “StoredProcedure”;
SqlCommand cmdTesterStats = new SqlCommand(SQLTesterStats, EDCConnectionString);
cmdTesterStats.CommandType = CommandType.StoredProcedure;
cmdTesterStats.Parameters.AddWithValue(”@start”, “04-01-2007 00:00″);
cmdTesterStats.CommandTimeout = 500000;
SqlDataReader TesterStatsReader = cmdTesterStats.ExecuteReader();
DataRow NewRow;
while (TesterStatsReader.Read())
{
NewRow[”product”] = TesterStatsReader[”family_name”].ToString();
}
TesterStatsReader.Close();
EDCConnectionString.Close();
21 May
Posted by Jayce as Programming, Windows - 301 views
Below code will help to keep the time synchronized between 2 systems. Just open command prompt and run these code.
net time \\TimeServer /set /yes
Replace TimeServer with the system name that you want to sync. After running this command, your current system will follow the TimeServer’s time.
Related topics:
Launch System Configuration Utility at Run - shortcut
Launch Remote Desktop Connection at Run - shortcut
Guide to change folder ownership
Below is the source code that will send email in Chinese or other character than English.
using System.Net.Mail;
MailMessage oMsg = new MailMessage();
oMsg.From = new MailAddress(”Email”, “Name”);
oMsg.To.Add(new MailAddress(”Email”,”Name”));
oMsg.Subject = “subject”;
oMsg.Body = “Chinese character”;
oMsg.BodyEncoding = System.Text.Encoding.GetEncoding( “utf-8″ );
SmtpClient c = new SmtpClient(”SMTP”);
c.Send(oMsg);
You can find more character set recognition at Microsoft page here.
Related topics:
Send email with attachment c# source code
RSS (Really Simple Syndication) is a web feed formats used to publish frequently updated digital content, such as blogs, news feeds or podcasts. But what is RSS? I never heard before. ![]()
By viewing on RSS, we as a reader can easily know the website that we visit is updated with latest news / stuff or not. This will save our time not to login to the website main page to check on the update. We can do so by simply click on the feed button like below. As you can see, “JayceOoi.com on the first page of Google!!!” is on the first of the RSS list, follow by “(rel=”nofollow”) on hyperlinks will not improve your website rank”. After I publish this post, there will be “What is RSS?” on top of them. Therefore, reader will know that Jayce Ooi’s Paradise has new post already.

There are a lot of ways to subscribe RSS. I use Firefox Live Bookmarks for my example above. You can subscribe it through email.
Below are some way to subscribe to Jayce Ooi’s Paradise.
Yeah… Finally, Jayce Ooi’s Paradise manages to get itself listed on the first page on Google when search using keyword - ‘jayce’.
It started at page 6. Then after few weeks when I checked again. Jayce Ooi’s Paradise already reach 2nd page at 2nd place. Today, I checked again. It reach first page already!!! While 3rd page on MSN and 7th page on Yahoo. ![]()
Thanks everyone that link to Jayce Ooi’s Paradise. It makes Jayce Ooi’s Paradise manages to be listed on Google first page. I will keep posting valuable post. Share knowledge that I have to everyone. Target == 1st place, 1st page on every search engine. ![]()

1st page on Google

3nd page on MSN

7th page on Yahoo