บทช่วยสอน 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


วัตถุเชื่อมต่อ

ออบเจ็กต์การเชื่อมต่อ ADO ใช้เพื่อสร้างการเชื่อมต่อแบบเปิดไปยังแหล่งข้อมูล ผ่านการเชื่อมต่อนี้ คุณสามารถเข้าถึงและจัดการฐานข้อมูลได้

หากคุณต้องการเข้าถึงฐานข้อมูลหลายครั้ง คุณควรสร้างการเชื่อมต่อโดยใช้วัตถุการเชื่อมต่อ คุณยังสามารถทำการเชื่อมต่อกับฐานข้อมูลโดยส่งสตริงการเชื่อมต่อผ่านออบเจกต์ Command หรือ Recordset อย่างไรก็ตาม การเชื่อมต่อประเภทนี้ดีสำหรับแบบสอบถามเดียวที่เฉพาะเจาะจงเท่านั้น


ProgID

set objConnection=Server.CreateObject("ADODB.connection")

คุณสมบัติ

Property Description
Attributes Sets or returns the attributes of a Connection object
CommandTimeout Sets or returns the number of seconds to wait while attempting to execute a command
ConnectionString Sets or returns the details used to create a connection to a data source
ConnectionTimeout Sets or returns the number of seconds to wait for a connection to open
CursorLocation Sets or returns the location of the cursor service
DefaultDatabase Sets or returns the default database name
IsolationLevel Sets or returns the isolation level
Mode Sets or returns the provider access permission
Provider Sets or returns the provider name
State Returns a value describing if the connection is open or closed
Version Returns the ADO version number


วิธีการ

Method Description
BeginTrans Begins a new transaction
Cancel Cancels an execution
Close Closes a connection
CommitTrans Saves any changes and ends the current transaction
Execute Executes a query, statement, procedure or provider specific text
Open Opens a connection
OpenSchema Returns schema information from the provider about the data source
RollbackTrans Cancels any changes in the current transaction and ends the transaction

กิจกรรม

หมายเหตุ:   คุณไม่สามารถจัดการเหตุการณ์โดยใช้ VBScript หรือ JScript (เฉพาะภาษา Visual Basic, Visual C++ และ Visual J++ เท่านั้นที่สามารถจัดการเหตุการณ์ได้)

Event Description
BeginTransComplete Triggered after the BeginTrans operation
CommitTransComplete Triggered after the CommitTrans operation
ConnectComplete Triggered after a connection starts
Disconnect Triggered after a connection ends
ExecuteComplete Triggered after a command has finished executing
InfoMessage Triggered if a warning occurs during a ConnectionEvent operation
RollbackTransComplete Triggered after the RollbackTrans operation
WillConnect Triggered before a connection starts
WillExecute Triggered before a command is executed

ของสะสม

Collection Description
Errors Contains all the Error objects of the Connection object
Properties Contains all the Property objects of the Connection object