ข้ามไปที่เนื้อหาหลัก

วิธีแก้ไข SQL Server 2008 Error : Saving changes is not permitted.


Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.
ซึ่งเกิดจากระบบป้องกันการแก้ไข Table ของ SQL Server 2008 เอง เราสามารถปิด Option ตรงนี้ได้ครับ วิธีการดังนี้
  1. ดูที่  Tool bar ของ SQL Server 2008 ให้เลือก Tools >> Options
  2. จะมีหน้าต่างขึ้นมา ให้ดูทางด้านซ้าย ให้เลือก Designers
  3. มองหาคำว่า “Prevent saving changes that require table re-creation” แล้ว  uncheck และกดปุ่ม OK ครับ

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

วิธีสำรองข้อมูลระบบปฏิบัติการ Linux โดยใช้คำสั่ง “dd”

1. เราสามารถสร้างไฟล์ Backup ของฮาร์ดดิสก์และบันทึกลงในอุปกรณ์จัดเก็บข้อมูลอื่นๆ มีข้อดีหลายประการในการสำรองข้อมูลของคุณไปเป็นอิมเมจ อีกประการหนึ่งคือความสะดวกในการใช้งาน โดยทั่วไปวิธีนี้จะเร็วกว่าการสำรองข้อมูลประเภทอื่น ทำให้คุณสามารถกู้คืนข้อมูลได้อย่างรวดเร็วหลังเกิดเหตุที่ไม่คาดคิดขึ้น ใช้คำสั่งด้านล่างเพื่อสำรองข้อมูลฮาร์ดดิสก์ /dev/sda ไปเป็นไฟล์อิมเมจของดิสก์  # dd if=/dev/sda of=/var/tmp/sda_disk.img   if: ไดรฟ์ต้นทาง (/dev/sda)  of: ไดรฟ์ปลายทาง (/dev/sdb)   2.ในการกู้คืนฮาร์ดดิสก์ด้วยไฟล์อิมเมจที่เราสร้างขึ้น ให้ใช้คำสั่ง dd ต่อไปนี้   # dd if=sda_disk.img of=/dev/sdc   if: ไดรฟ์ต้นทาง (/dev/sda)  of: ไดรฟ์ปลายทาง (/dev/sdb)

การแปลงวันที่และเวลาโดยใช้ SQL Server

รูปแบบวันที่ของ SQL Server มีหลายรูปแบบใช้ตัวเลือกรูปแบบวันที่พร้อมกับฟังก์ชั่น เช่น - ต้องการรูปแบบ YYYY-MM-DD ใช้คำสั่งคือ  SELECT CONVERT(varchar, getdate(), 23) -  ต้องการรูปแบบ  MM/DD/YYYY  ใช้คำสั่งคือ   SELECT CONVERT(varchar, getdate(), 1)   ด้านล่างนี้เป็นรายการรูปแบบและตัวอย่างของผลลัพธ์   DATE ONLY FORMATS Format # Query Sample 1 select convert(varchar, getdate(), 1) 12/30/06 2 select convert(varchar, getdate(), 2) 06.12.30 3 select convert(varchar, getdate(), 3) 30/12/06 4 select convert(varchar, getdate(), 4) 30.12.06 5 select convert(varchar, getdate(), 5) 30-12-06 6 select convert(varchar, getdate(), 6) 30 Dec 06 7 select convert(varchar, getdate(), 7) Dec 30, 06 10 select convert(varchar, getdate(), 10) 12-30-06 11 select convert(varchar, getdate(), 11) 06/12/30 12 select convert(varchar, getdate(), 12) 061230 23 select convert(varchar, getdate(), 23) 2006-12-30 101 select convert(varchar, getda...

วิธีการติดตั้ง Docker บน Debian 9 (Stretch)

Step 1  ก่อนติดตั้ง ถ้ามีการติดตั้ง  Docker มาก่อน ต้องลบก่อนนะครับด้วยคำสั่ง  apt-get purge docker lxc-docker docker-engine docker.io ตอนนี้ติดตั้งแพ็คเกจที่จำเป็นบนระบบของคุณเพื่อติดตั้ง Docker บนระบบ Debian ใช้คำสั่งด้านล่างนี้นี้ครับ: apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common Step 2 ติดตั้ง Docker Repository สร้างคีย์ เพื่อเอาไว้ตรวจสอบลายเซ็นของ packages ก่อนติดตั้งครับด้วยคำสั่งต่อไปนี้ apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common หลังจากนั้นให้เพิ่มที่เก็บ Docker บนระบบ Debian ของคุณซึ่งมีแพ็คเกจ Docker รวมถึงการอ้างอิง คุณต้องเปิดใช้งานที่เก็บนี้เพื่อติดตั้ง Docker บน Debian ด้วยคำสั่งดังนี้ add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" Step   3 — ติดตั้ง Docker on Debian 9 ระบบของคุณพร้อมสำหรับการติดตั้ง Docker แล้ว รันคำสั่งต่อไปนี้ เลย apt-get update  apt-get install docker-ce  หลังจากติดตั้ง Do...