บทช่วยสอน 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 คุณสมบัติ


❮ อ้างอิงวัตถุการเชื่อมต่อที่สมบูรณ์

คุณสมบัติ Attributes ตั้งค่าหรือส่งกลับค่าแบบยาวที่ระบุคุณลักษณะอย่างน้อยหนึ่งอย่างของอ็อบเจ็กต์

หมายเหตุ:เมื่อตั้งค่าแอตทริบิวต์หลายรายการ จะสามารถรวมค่าได้

Object Description of the Attributes Property
Connection The Attributes property has read/write permissions on a Connection object. Its value can be the sum of one or more XactAttributeEnum values. Default value is 0
Parameter The Attributes property has read/write permissions on a Parameter object. Its value can be the sum of one or more ParameterAttributesEnum values. Default value is adParamSigned
Field

The Attributes property has read/write permissions when used to create a Recordset, but it has read-only permissions when you open an existing Recordset. Its value can be the sum of one or more FieldAttributeEnum values

Property The Attributes property is read-only for a Property object. Its value can be the sum of one or more PropertyAttributesEnum values

ไวยากรณ์

object.Attributes

ตัวอย่าง - สำหรับวัตถุการเชื่อมต่อ

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

response.write(conn.Attributes)

conn.close
%>

ตัวอย่าง - สำหรับวัตถุฟิลด์

<%
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

set f=Server.CreateObject("ADODB.Field")

'Display the field attributes of the Orders Table
for each f in rs.Fields
  response.write("Attr:" & f.Attributes & "<br>")
  response.write("Name:" & f.Name & "<br>")
  response.write("Value:" & f.Value & "<br>")
Next

rs.Close
conn.close
set rs=nothing
set conn=nothing
%>

ตัวอย่าง - สำหรับอ็อบเจ็กต์คุณสมบัติ

<%
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

set prop=Server.CreateObject("ADODB.Property")

'Display the property attributes of the Orders Table
for each prop in rs.Properties
  response.write("Attr:" & prop.Attributes & "<br>")
  response.write("Name:" & prop.Name & "<br>")
  response.write("Value:" & prop.Value & "<br>")
next

rs.close
conn.close
set rs=nothing
set conn=nothing
%>

ค่า XactAttributeEnum

Constant Value Description
adXactAbortRetaining 262144 When calling RollbackTrans it automatically starts a new transaction.
adXactCommitRetaining 131072 When calling CommitTrans it automatically starts a new transaction.

ParameterAttributesEnum Values

Constant Value Description
adParamSigned 16 The parameter will accept signed values.
adParamNullable 64 The parameter will accept null values.
adParamLong 128 The parameter will accept long binary data.

FieldAttributeEnum ค่า

Constant Value Description
adFldCacheDeferred 0x1000 Provider caches the field values and reads from the cache.
adFldFixed 0x10 Field contains fixed-length data.
adFldIsChapter 0x2000 Field contains a chapter value that specifies a child recordset.
adFldIsCollection 0x40000 The field specifies that the resource represented by the record is a collection of  resources
adFldIsDefaultStream 0x20000 Field contains the default stream for the resource represented by the record.
adFldIsNullable 0x20 Field accepts null values.
adFldIsRowURL 0x10000 Field contains the URL that names the resource from the data store represented by the record.
adFldLong 0x80 Field is a long binary field.
adFldMayBeNull 0x40 You can read null values from the field.
adFldMayDefer 0x2 Field values are not retrieved from the data source with the whole record, but only when you explicitly access them.
adFldNegativeScale 0x4000 Field represents a numeric value from a column that supports negative scale values.
adFldRowID 0x100 Field contains a persistent row identifier that cannot be written to and has no meaningful value except to identify the row (such as a unique id)
adFldRowVersion 0x200 Field contains some kind of time/date stamp used to track updates.
adFldUnknownUpdatable 0x8 The provider cannot determine if you can write to the field.
adFldUnspecified  -1
0xFFFFFFFF
Provider does not specify the field attributes.
adFldUpdatable 0x4 You can write to the field.

คุณสมบัติคุณสมบัติEnum Values

Constant Value Description
adPropNotSupported 0 The property is not supported by the provider.
adPropRequired 1 The user must specify a value for this property before the data source is initialized.
adPropOptional 2 The user does not need to specify a value for this property before the data source is initialized.
adPropRead 512 The user can read the property.
adPropWrite 1024 The user can set the property.

❮ อ้างอิงวัตถุการเชื่อมต่อที่สมบูรณ์