|
 |
|
อยากทราบ Code การ Update SqlClient แบบ connection ใน C# ที่มีคีย์หลักมากกว่า 1 ตัวอ่ะครับ |
|
 |
|
|
 |
 |
|
Key มันซ้ำกันน่ะครับ คุณจะต้อง Update ทั้งหมดให้เป็นค่าอื่นก่อนครับ จากนั้นค่อย Update ค่าใหม่เข้าไปครับ 
|
 |
 |
 |
 |
Date :
2012-08-19 08:18:49 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมต้อง Insert ก่อนแล้วค่อย Update ไช่ไหมครับ ยังไงหรอครับ ฮ่าๆๆๆ
|
 |
 |
 |
 |
Date :
2012-08-19 12:02:22 |
By :
burapa19056 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตกลงคุณจะทำอะไรครับ Update หรือว่า Insert ครับ
|
 |
 |
 |
 |
Date :
2012-08-19 12:19:28 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมต้องการอัพเดทครับผม พอดีตารางที่ต้องการอัพเดทมันมี คีย์หลักอยู่ 3 ตัวอ่ะครับ ผมไม่รู้ว่าจะใช้คำสั่ง Update ยังไงอ่ะครับ    
|
 |
 |
 |
 |
Date :
2012-08-19 12:21:53 |
By :
burapa19056 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็จาก Error Key มันซ้ำน่ะครับ แค่นั้นแหละครับ 
|
 |
 |
 |
 |
Date :
2012-08-19 12:30:12 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คือว่าผมจะ Update ตารางที่มีคีย์หลัก 3 ตัวอ่ะครับ พอผม Where ไปที่ คีย์หลักตัวที่ 1 แล้วมันฟ้องซ้ำไปคีย์ตัวที่ 2 และ 3 อ่ะครับ ผมต้องทำยังไงอ่ะครับ มัน Update ไม่ได้เลย
|
 |
 |
 |
 |
Date :
2012-08-19 12:40:04 |
By :
burapa19056 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ได้แล้วครับ ใส่
try{
} เข้าไป อิอิ ขอบคุรมากครับผม
|
 |
 |
 |
 |
Date :
2012-08-19 13:35:12 |
By :
burapa19056 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|