บทช่วยสอน ASP

ASP HOME

กวดวิชา WP

แนะนำหน้าเว็บ มีดโกนหน้าเว็บ เค้าโครงหน้าเว็บ โฟลเดอร์หน้าเว็บ หน้าเว็บทั่วโลก แบบฟอร์มหน้าเว็บ วัตถุหน้าเว็บ ไฟล์หน้าเว็บ ฐานข้อมูลหน้าเว็บ ผู้ช่วยหน้าเว็บ หน้าเว็บ WebGrid แผนภูมิหน้าเว็บ อีเมลหน้าเว็บ ความปลอดภัยของหน้าเว็บ เผยแพร่หน้าเว็บ ตัวอย่างหน้าเว็บ ชั้นเรียนของหน้าเว็บ

มีดโกน ASP.NET

แนะนำมีดโกน มีดโกนไวยากรณ์ มีดโกน C# ตัวแปร มีดโกน C# ลูป มีดโกน C# Logic ตัวแปรมีดโกน VB มีดโกน VB Loops มีดโกน VB Logic

ASP Classic

แนะนำ ASP ไวยากรณ์ ASP ตัวแปร ASP ขั้นตอน ASP เงื่อนไข ASP ASP วนรอบ แบบฟอร์ม ASP คุกกี้ ASP เซสชัน ASP แอปพลิเคชัน ASP ASP #รวม ASP Global.asa ASP AJAX อีเมล ASP ตัวอย่าง ASP

การอ้างอิง ASP

ฟังก์ชัน ASP VB คีย์เวิร์ด ASP VB การตอบสนอง ASP คำขอ ASP แอปพลิเคชัน ASP เซสชัน ASP เซิร์ฟเวอร์ ASP ข้อผิดพลาด ASP ASP FileSystem ASP TextStream ไดรฟ์ ASP ไฟล์ ASP โฟลเดอร์ ASP พจนานุกรม ASP ASP AdRotator ASP BrowserCap การเชื่อมโยงเนื้อหา ASP ตัวหมุนเนื้อหา ASP ASP Quick Ref

กวดวิชา ADO

แนะนำ ADO ADO Connect ชุดระเบียน ADO จอแสดงผล ADO แบบสอบถาม ADO ADO Sort เพิ่ม ADO ADO Update ADO ลบ สาธิต ADO ADO เร่งความเร็ว

วัตถุ ADO

คำสั่ง ADO การเชื่อมต่อ ADO ข้อผิดพลาด ADO ADO Field พารามิเตอร์ ADO ADO พร็อพเพอร์ตี้ บันทึก ADO ชุดระเบียน ADO ADO สตรีม ประเภทข้อมูล ADO

คุณสมบัติสถานะ ADO


❮ อ้างอิงวัตถุภาคสนามที่สมบูรณ์

คุณสมบัติ Status ส่งกลับ ค่า FieldStatusEnum ที่ระบุสถานะของวัตถุ Field ค่าเริ่มต้นคือ adFieldOK

หากการอัปเดตใด ๆ ล้มเหลว ข้อผิดพลาดจะถูกส่งคืน และคุณสมบัติ Status จะระบุค่าที่รวมกันของการดำเนินการและรหัสสถานะข้อผิดพลาด สามารถใช้คุณสมบัติสถานะสำหรับแต่ละฟิลด์เพื่อพิจารณาว่าเหตุใดฟิลด์จึงไม่ถูกเพิ่ม แก้ไข หรือลบ

ปัญหาเกี่ยวกับการเพิ่ม การปรับเปลี่ยน หรือการลบฟิลด์จะถูกรายงานผ่านคุณสมบัตินี้ ตัวอย่างเช่น หากผู้ใช้ลบฟิลด์ ฟิลด์นั้นจะถูกทำเครื่องหมายเพื่อลบในคอลเลกชันฟิลด์ หากการเรียกอัปเดตส่งกลับข้อผิดพลาดเนื่องจากผู้ใช้พยายามลบฟิลด์ที่เขาไม่ได้รับอนุญาต สถานะสำหรับฟิลด์นี้จะเป็น adFieldPermissionDenied หรือ adFieldPendingDelete


ไวยากรณ์

objfield.Status

ตัวอย่าง

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"

set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from orders", conn

response.write(rs.Fields(0).Status)

rs.Close
conn.close
%>

FieldStatusEnum ค่า

Constant Value Description
adFieldOK 0 Default. The field was successfully added or deleted
adFieldCantConvertValue 2 The field cannot be retrieved or stored without loss of data
adFieldIsNull 3 The provider returned a null value
adFieldTruncated 4 Variable-length data was truncated when reading from the data source
adFieldSignMismatch 5 The data value returned by the provider was signed, but the data type of the ADO field value was unsigned
adFieldDataOverflow 6 The data returned from the provider overflowed the data type of the field
adFieldCantCreate 7 The field could not be added because the provider exceeded a limitation
adFieldUnavailable 8 The provider could not determine the value when reading from the data source
adFieldPermissionDenied 9 The field cannot be modified because it is read-only
adFieldIntegrityViolation 10 The field cannot be modified because it is a calculated or derived entity
adFieldSchemaViolation 11 The value violated the data source schema constraint for the field
adFieldBadStatus 12 An invalid status value was sent from ADO to the OLE DB provider
adFieldDefault 13 The default value for the field was used when setting data
adFieldIgnore 15 This field was skipped when setting data values in the source
adFieldDoesNotExist 16 The field does not exist
adFieldInvalidURL 17 The data source URL contains invalid characters
adFieldResourceLocked 18 The provider cannot perform the operation because the data source is locked
adFieldResourceExists 19 The provider cannot perform the operation because an object already exists at the destination URL and it is not able to overwrite the object
adFieldCannotComplete 20 The server of the URL specified by Source could not complete the operation
adFieldVolumeNotFound 21 The provider is unable to locate the storage volume indicated by the URL
adFieldOutOfSpace 22 The provider is unable to obtain enough storage space to complete a move or copy operation
adFieldCannotDeleteSource 23 During a move operation, a tree or subtree was moved to a new location, but the source could not be deleted
adFieldReadOnly 24 The field in the data source is read-only
adFieldResourceOutOfScope 25 A source or destination URL is outside the scope of the current record
adFieldAlreadyExists 26 The specified field already exists
adFieldPendingInsert 0x10000 The Append operation caused the status to be set. The field has been marked to be added to the Fields collection after the Update method is called
adFieldPendingDelete 0x20000 The Delete operation caused the status to be set. The field has been marked for deletion from the Fields collection after the Update method is called
adFieldPendingChange 0x40000 The field has been deleted and then re-added or the value of the field which previously had a status of adFieldOK has changed
adFieldPendingUnknown 0x80000 The provider cannot determine what operation caused field status to be set
adFieldPendingUnknownDelete 0x100000 The provider cannot determine what operation caused field status to be set, and that the field will be deleted from the Fields collection after the Update method is called.

❮ อ้างอิงวัตถุภาคสนามที่สมบูรณ์