Tuesday, March 24, 2015

Sharing Everything From My Experience And Knowlegde

Sharing Everything From My Experience And Knowlegde


Set Unlimited ConnectionTimeOut And CommandTimeOut VBNET

Posted: 23 Mar 2015 09:18 PM PDT

Apa itu ConnectionTimeOut ? adalah batas waktu yang di setting untuk sebuah variable koneksi baik itu SqlClient, OLEDB dan ODBC dalam melakukan proses koneksi ke server. Secara default ConnectionTimeOut=15 detik. Jadi jika misalnya program kita sedang koneksi di form_login misalnya, dan ternyata server-nya ngehang atau bussy(sibuk) atau jaringannya putus dan lain lain selama 20 detik maka pasti akan muncul error : TIME OUT EXPIRED
Karena ConnectionTimeOut yang kita seting = 15 detik sedangkan server/jaringan bermasalah selama 20 detik. Jika kita seting ConnectionTimeOut= 30 detik maka Error tersebut tidak akan muncul, karena begitu waktu menginjak ke detik 21, maka form_login tersebut akan berhasil koneksi ke server.
Apa itu CommandTimeOut ? adalah batas waktu yang di setting untuk sebuah variable command baik itu SqlClient, OLEDB dan ODBC dalam melakukan proses execute (CRUD) ke server. Secara default ConnectionTimeOut=30 detik. Jadi jika misalnya program kita sedang tarik report (generate report) misalnya, dan ternyata server-nya ngehang atau bussy(sibuk) atau jaringannya putus dan lain lain sehingga menyebabkan kerja Database Server lama (misal 60 detik baru data report akan keluar), maka akan muncul error :
karena CommandTimeOut yang kita seting = 30 detik sedangkan server/jaringan memberi feedback ke client 60 detik.
Jika kita seting CommandTimeOut= 120 detik (2 menit) maka Error tersebut tidak akan muncul, karena begitu waktu menginjak ke detik 60, maka data report tersebut akan keluar.

Jangan salah pengertian :
ConnectionTimeOut = 15 detik, bukan berarti koneksi baru akan suskes di detik 15, 15 detik hanyalah waktu tunggu. Ya jika koneksi lancar 1 detik pun bisa langsung koneksi.
CommandTimeOut = 30 detik, bukan berarti Sql Query baru akan suskes di detik 30, 30 detik hanyalah waktu tunggu. Ya jika Sql Query tersebut lancar di proses oleh servernya, 1 detik pun bisa langsung muncul result nya.

Bagaimana cara mengubah ConnectionTimeOut atau CommandTimeOut menjadi unlimited ?
ya kita set saja nilainya menjadi 0 (nol) = artinya unlimited (tanpa ada batas waktu tunggu)

Dari pengalaman saya :
1. ConnectionTimeOut idealnya 30 detik saja (1.2 menit), agar jika di detik 31 belum koneksi maka akan muncul error kenapa ga konek, jadi kita tahu masalahnya apa. Jika kita set unlimited maka justru bahaya, bisa jadi seharin itu form_login akan ngehang terus tanpa ada respond apa apa (try connection) padahal servernya mati (misalnya).

2. CommandTimeOut biasanya saya set Unlimited saja, karena CRUD atau Sql Query saat tarik report misalnya kita tidak bisa prediksi berapa lama Sql Query itu akan selesai. Di kantor saya pun jika menarik report bulanan dengan jumlah transaksi jutaan row dan kompleksitas Query yang tinggi bisa memakan waktu 1-2 jam.

Dibawah ini bagaiman cara kita menerapkan ConnectionTimeOut dan CommandTimeOut di Coding VBNET

'Contoh Koneksi

Using con As New SqlConnection("data source=.;user id=sa;password=;initial catalog=djiesoft;CONNECTION TIMEOUT=30")
  con.Open()
End Using

'Contoh Query
Dim tbl As New DataTable
Using con As New SqlConnection("data source=.;user id=sa;password=;initial catalog=neobdg_c;CONNECTION TIMEOUT=30")
  con.Open()
  Using cmd As New SqlCommand("select * from produk", con) With {.CommandTimeout = 0}
      Using adp As New SqlDataAdapter(cmd)
         adp.Fill(tbl)
      End Using
  End Using
End Using

Jika kamu jarang/belum biasa menggunakan "USING", ini dia cara Clasic :



Dim con As New SqlClient.SqlConnection
With con
  .ConnectionString = "data source=.;user id=sa;password=;initial catalog=djiesoft;CONNECTION TIMEOUT=30"
  .Open()
End With

Dim cmd As New SqlCommand("select * from produk", con)
cmd.CommandTimeout = 0

'atau Dim cmd As New SqlCommand("select * from produk", con) With {.CommandTimeout = 0}

Dim adp As New SqlDataAdapter(cmd)
adp.Fill(tbl)


Tags:
Timeout error in VB.NET while running a sql script , Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding, VB.NET - SQL Command Timeout Error on updating a record, [SOLVED] : time out expired, mengatasi error query timeout

Monday, March 9, 2015

pandhawa-tiga

pandhawa-tiga


The Allure of Vintage Ford Cars

Posted: 09 Mar 2015 02:25 PM PDT

Ford vehicles have always been synonymous with American pride and tradition. One of the biggest vehicle manufacturers today, the Ford brand is known all over the world and has been attached with a tag of durability and quality. These are the same qualities it has preserved through the years and more than a century after the brand had been unveiled, a number of its cars from its early and mid productions still ply American streets, if not, vintage car shows.

Ford has contributed a big chunk in the numerous innovations in the automotive industry. Its greatest contribution is the moving assembly line, which allowed vehicles to be produced at a much faster rate. This allowed the price of the vehicles to be reduced, this more people could afford to have their own vehicles.



This doesn't mean though that Ford just churned out one car after another leaving quality behind. On the contrary, because they were able to produce vehicles at a fast rate, they were able to concentrate fully on their research and development which allowed them to come up with high standard vehicles.

This high quality has allowed a number of their cars from the post second world war era to still be street worthy today. Vintage Ford cars have numerous clamor from Ford loyalists and although  a full functioning and new-like condition is next to impossible to find, many still invest their time, money and efforts in restoring them.

Some of the more popular vintage cars by Ford produced in the fifties and the sixties where the Fairlane, Thunderbird, Falcon, Galaxie, Torino, LTD and of course, the Mustang. Many of these make and models were reminiscent of the muscle cars that dominated the American auto industry and market in that era. Big powerful engines and loud roaring were typical of these muscle cars and they were distinctively American.

It is the Ford Mustang though that has captured a lot of imagination from then American teenagers and saw it as a powerful and sexy vehicle that they must have. There were even many Hollywood films that used the Mustang in their movies which glamorized it further, because hey, if Hollywood says that the Mustang is hot, who are we to contradict it.

Owning and maintaining vintage Ford cars, like the Mustang, today will entail some expense. This is because vintage Ford parts may be hard to come by. For some vehicles, the parts may be easier to find because of the vast number of their production. Because of this, parts may be lifted from the other cars with the same make and model and they can be used to restore other cars.

This though is time consuming as you still need to go to junk yards. For an easier time, you may just scour the internet for these parts. Just make sure that you get the right ones.

You can never go wrong with vintage Ford cars. They are an American tradition and they can give you that certain distinction that makes people turn their heads to look at the cars. As an owner of a fully restored vintage Ford car, this will surely make you proud.

Up until today, Ford still continues to bring out sleek, powerful and sexy vehicles reminiscent of its past and its commitment to exceptional engineering is what makes their customers loyal to them. What we may consider new now, may soon be regarded as vintage Ford cars in the future.

Vintage Car Insurance Online, the Easy and Most Convenient Way

Posted: 09 Mar 2015 02:23 PM PDT

Restoring a vintage car is a labor of love. While admittedly there are some that do this as a business, all of them, those that restore and collect vintage cars, are driven by their passion, they are fueled by their desire for vintage cars and watching them return to their full glory is what makes them happy.

Ownership of a vintage car sets an image of glamour, prestige and a status symbol that shows you can afford its high maintenance, think Jay Leno. Aside from having the money to pursue such an endeavor, you should also have the passion for it. You need to be very patient when restoring a vintage car.



After restoring a vintage car, a lot of people would either drive out from time to time, or keep it in storage so that they will be in great condition when they present it at car shows. This great concern for safety is understandable; this is because a vintage car restoration project is no laughing matter. A huge investment in time, money and effort is done and watching a car get destroyed or to have it stolen can be a huge blow.

This is where having an insurance comes in. But unlike regular car insurance, vintage car insurance can be different. One thing that collector's like is that a vintage car insurance is relatively far cheaper than regular car insurance. You have to consider though that this insurance policy is cheaper because they only cover certain mileage. There are also conditions like parking garages that are considered.

Also, the price of a vintage car insurance policy will depend on the make and model of the vehicle, the rarer the car is and the more expensive it is in the market, the higher the cost of the policy is. Furthermore, make sure that your insurer will guarantee the valuation of your car prior to signing the policy. There have been some insurance companies who have denied claims for complete valuation. Although having a guaranteed valuation included in your policy will mean extra charges, this is all worthwhile as you are protected in the event that your car is stolen or is damaged beyond total repair.

Looking for vintage car insurance can be as simple as flipping through the yellow pages or browsing through vintage car magazines. There you will be able to find car insurance companies that can be able to give you a quote after you give out your details through a phone call, or if you go to their physical office. Comparing their quotes can be a troublesome task. You need to make several phone calls or visits to get their quote. Plus, interacting with an insurance agent can get you committed to their policy with their persuasion.

One of the more popular ways in finding vintage car insurance is browsing the internet. Here you will be able to find numerous insurance companies that can offer great deals in insurance policies. Plus, you don't have to go to their physical offices to get a quote. In a matter of minutes, you will be able to get quotes from different companies and compare them. Aside from their prices though, you have to greatly consider what is included in the policy. One great thing about shopping for a policy through the net, you are not pressured to be committed to their service. 

Sunday, March 8, 2015

pandhawa-tiga

pandhawa-tiga


Make A Great Car History

Posted: 08 Mar 2015 12:07 PM PDT

I have many friends that brag about their amazing car history to anyone who will listen. They rant and rave about all of the great memories they have made with their car and they cannot stop talking about all of the great road trips their trusty car has taken them on. I'll be honest, I got a little jealous after hearing a few of their stories, so I decided to share a little car history of my own.



I love my car, I really do. I love it more than most everything I own and use. A few family photographs and notes from cherished friends are about all that top the love I have for my car. So I guess you could say my car history began the day I bought my beauty. September 5, 1999. Oh, I'll never forget that day. I'll never forget the way I felt as I test drove the car that would one day be the main character in my personal car history story. I drove her, I liked her, so I brought her home. (With a little help from mom and dad of course).

She wasn't in the driveway for more than one hour when I realized that I couldn't begin a true car history with a car that didn't have a name! So I named her. Princess Bug. I know, it sounds silly now, but at the time it felt perfect. The perfect name for the perfect car to enjoy year after year of perfect car history with. Right? Wrong. It is a good thing that I loved my Princess Bug from the start because it wasn't three months after purchasing her that she was in the shop for the first time. Nothing too major was wrong with her, but she still costed me more than I had planned on.

Other than a few annoying trips to the shop for repairs, the car history that Princess Bug has given me is filled with wonderful and cherished memories. I remember when me and three friends piled into Princess Bug and were determined to drive from our hometown in Indiana all the way to Hollywood and back in just a week. Some people say that ignorance is bliss, but since that roadtrip I've always said that ignorance is foolish. We never made it even close to Hollywood but our travels through Missouri and Illinois were pleasant enough to ease the sting of not seeing good ole Cali.

Princess Bug has given me a car history filled with many things to remember I guess. But if you're anything like I was before I started making a history with my car, you're really not that interested in what I have to say. You've been intrigued and now you can't wait to begin a car history with a special vehicle all your own. Just don't forget to name her!