Solving MS SQL 2005: Timeout expired

MS SQL Server April 25th, 2008

ข้อความ Error:
Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

สาเหตุ:
หลังจากที่ทำการเปิด SQL Connection แล้วไม่มีการปิดเป็นเวลานาน
อาจเนื่องมาจาก code ที่เราสั่งให้จัดการกับ SQL มีหลายชุดคำสั่งซ้อนกันอยู่

วิธีแก้ไข:
1. ให้เราทำการ เปิด-ปิด connection บ่อยมากขึ้น หรือ
2. เพิ่มค่า timeout “CommandTimeout = 50″ (50 = 50 วินาที) หรือลองดูตาม code ตัวอย่างด้านล่าง

Public Shared Function Query(ByVal sql As string) as string
Dim Data As String = String.Empty
Dim connString as String = ConfigurationManager.AppSettings("conString")

Using conn As New SqlConnection(connString)
Dim cmd As New SqlCommand(sql, conn)
cmd.CommandTimeout = 50;
Try
conn.Open()
Data = cmd.ExecuteScalar().ToString()
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Using

return Data
End Function

อ้างอิงจาก: http://forums.asp.net/t/1252358.aspx

Tags: ,

วิธี Import/Export MS SQL 2005 บน Plesk

MS SQL Server April 24th, 2008

ก่อนเริ่มลงมือ
- ต้องสร้าง Database และระบุ Username ใน Plesk ให้เรียบร้อยก่อน
- ติดตั้งโปรแกรม Microsoft SQL Server Management รุ่น 2005 Enterprise Edition (Express ใช้ไม่ได้)

ขั้นตอน
1.  เปิดโปรแกรม Microsoft SQL Server Management ในเครื่องเรา
2. เข้าไปที่ Datababase ที่ต้องการ export
3. คลิ๊กขวา เลือก Tasks > Export Data
4. กด Next แล้วจะขึ้น Choose a Data Source
5. กด Next จะขึ้น Choose a Destination
6. ช่อง Server พิมพ์ชื่อโดเมน
7. ในกรอบ Authentication เลือก SQL Authenticattion แล้วกรอก Username/Password ตามที่ระบุไว้ใน Plesk
8. ช่อง Database ใส่ชื่อ Database ที่ระบุไว้ใน Plesk แล้วกด Next
9. เลือก Copy data from one or more tables or views
10. เลือก Select All แล้วกด Next
11. จะขึ้น Save and Execute Package ให้กด Next อีกครั้ง แล้วกด Finish

Tags: ,

keyboard ภาษาไทยบน iPhone 1.1.4

iPhone April 23rd, 2008

1. Uninstall ทุกอย่างเกี่ยวกับ Keyboard (ถ้ามีลงไว้ก่อนแล้ว)

2. ไปที่ installer แล้วเพิ่ม source http://pxl.freemyiphone.com

3. ไปที่ install เลือก FreeMyiPhone.com (Thai)

4. Install Mobile Enhancer 2.0+

5. Install FMiP Keyboard (3-Row)

6. Install Thai System Fonts

7. Restart หรือ ปิด-เปิดเครื่องใหม่

8. ไปที่ Settings > General > International > Keyboards > Russian on

9. เรียบร้อย

โน๊ต:

- ถ้า Russian Keyboard  ไม่ขึ้น ให้ลองปิด-เปิด เครื่องใหม่ครับ

Tags: ,

Importing multiple vCards into Outlook

Blogs April 23rd, 2008

I recently found myself with a couple hundred vCards I needed in Outlook 2007. Sadly, Outlook wants you to either import them individually or Save and Close each one. Thankfully, there’s a workaround. I’m doing this with Vista and Office 2007. I don’t have my XP/2003 setup in front of me right now, so I can’t test it. But here’s what you do:

1. Open Windows Contacts

2. Click Import

3. Select vCard (VCF file)

4. Select all the contacts to import, then click Open. Let it do its thing. OK. So, now they’re in Windows Contacts, and Outlook know how to import contacts from here.

5. Switch to Outlook.

6. Choose File, then Import and Export.

7. Choose “Import Internet Mail and Addresses”, then click OK

8. Select Outlook Express…or Windows Mail. Uncheck Import Mail.

9. Click Next.

10. Decide how you want to handle duplicates, then click Finish.

Tags:

Firefox 3 Beta 5

IT News April 22nd, 2008

มีความเสถียรมากขึ้นและแก้ไขบักไปหลายจุด

Donwload Firefox 3 Beta 5

Tags: ,

Copyright © 2008 iBiz Network Co., Ltd. Powered by wordpress, Theme by ericulous