w3schools    w3Schools
Search W3Schools :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
ADO Tutorial
ADO HOME
ADO Intro
ADO Connect
ADO Recordset
ADO Display
ADO Query
ADO Sort
ADO Add
ADO Update
ADO Delete
ADO Demo
ADO Speed Up

ADO Objects
ADO Command
ADO Connection
ADO Error
ADO Field
ADO Parameter
ADO Property
ADO Record
ADO Recordset
ADO Stream
ADO DataTypes

ADO Summary

Examples
ADO Examples

Exam
ADO Exam

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Tutorials
W3Schools Forum

Helping W3Schools

 

ADO Attributes Property


Connection Object Reference Complete Connection Object Reference

The Attributes property sets or returns a long value that indicates one or more characteristics of an object.

Note: When setting multiple attributes, it is possible to sum the values.

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

Syntax

object.Attributes

Example

For a Connection object:

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

For a Field object:

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

For a Property object:

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

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 Values

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.


PropertyAttributesEnum 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.


Connection Object Reference Complete Connection Object Reference


Altova® MissionKit® - Integrated suite of XML tools

The Altova MissionKit is a suite of intelligent XML tools, including:

XMLSpy® – industry-leading XML editor

  • Support for all XML-based technologies
  • Graphical editing views, powerful debuggers, code generation, & more

MapForce® – graphical data mapping tool

  • Drag-and-drop data conversion with code generation
  • Support for XML, DBs, EDI, Excel® 2007, text, Web services

StyleVision® – visual stylesheet designer

  • Drag-and-drop stylesheet design for XML & databases
  • Output to HTML, PDF, RTF, Word 2007, & more

And more…

Try before you buy with a free fully functional 30-day trial

Download today




diploma   

Get Your Diploma!

W3Schools' Online Certification Program is the perfect solution for busy professionals who need to balance work, family, and career building.

The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.

The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.

The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.

The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.

The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).


 
WEB HOSTING
ASP.NET Web Hosting
ASP.NET
Web Hosting
$15 Domain Name
Registration
Save $20 / year!
Buy UK Domain Names
Register Domain Names
Cheap Domain Names
Cheap Web Hosting
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Custom Programming
FREE Trial or Demo
Web Content Manager
Forms,Web Alerts,RSS
Download XML editor
FREE Flash Website
FREE Web Templates
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification

Home HOME or Top of Page Validate   Validate   W3C-WAI level A conformance icon Printer Friendly  Printer Friendly

W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.