📄 prop_field_status.asp
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ADO Status Property</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<link rel="stylesheet" type="text/css" href="../stdtheme.css" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<a name="top"></a>
<table cellpadding="0" cellspacing="0" width="100%" bgcolor="#808080">
<tr>
<td width="234" valign="top">
<a href="../default.htm"><img src="../images/w3default80.jpg" border="0" alt="W3Schools" /></a>
</td>
<th valign="middle" align="left" class="right">
<iframe style="background-color:#808080" src="../banners/bannerframe.asp@adpartner=aspall2" height="90" width="728"
marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
<br /></th>
</tr>
</table>
<table style="margin-left:1px" width="800px" border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="137" class="content" valign="top"><br />
<a class="left" href="../default.asp" target="_top">
<img src="../images/homeicon.gif" border="0" alt="home" /></a>
<a class="left" href="../default.asp" target="_top">
<b>HOME</b></a>
<br /><br />
<b>ADO Tutorial</b><br />
<a class="left" target="_top" href="default.asp" >ADO HOME</a><br />
<a class="left" target="_top" href="ado_intro.asp" >ADO Intro</a><br />
<a class="left" target="_top" href="ado_connect.asp" >ADO Connect</a><br />
<a class="left" target="_top" href="ado_recordset.asp" >ADO Recordset</a><br />
<a class="left" target="_top" href="ado_display.asp" >ADO Display</a><br />
<a class="left" target="_top" href="ado_query.asp" >ADO Query</a><br />
<a class="left" target="_top" href="ado_sort.asp" >ADO Sort</a><br />
<a class="left" target="_top" href="ado_add.asp" >ADO Add</a><br />
<a class="left" target="_top" href="ado_update.asp" >ADO Update</a><br />
<a class="left" target="_top" href="ado_delete.asp" >ADO Delete</a><br />
<a class="left" target="_top" href="ado_demo.asp" >ADO Demo</a><br />
<a class="left" target="_top" href="ado_getstring.asp" >ADO Speed Up</a><br />
<br />
<b>ADO Objects</b><br />
<a class="left" target="_top" href="ado_ref_command.asp" >ADO Command</a><br />
<a class="left" target="_top" href="ado_ref_connection.asp" >ADO Connection</a><br />
<a class="left" target="_top" href="ado_ref_error.asp" >ADO Error</a><br />
<a class="left" target="_top" href="ado_ref_field.asp" >ADO Field</a><br />
<a class="left" target="_top" href="ado_ref_parameter.asp" >ADO Parameter</a><br />
<a class="left" target="_top" href="ado_ref_property.asp" >ADO Property</a><br />
<a class="left" target="_top" href="ado_ref_record.asp" >ADO Record</a><br />
<a class="left" target="_top" href="ado_ref_recordset.asp" >ADO Recordset</a><br />
<a class="left" target="_top" href="ado_ref_stream.asp" >ADO Stream</a><br />
<a class="left" target="_top" href="ado_datatypes.asp" >ADO DataTypes</a><br />
<br />
<a class="left" target="_top" href="ado_summary.asp" >ADO Summary</a><br />
<br />
<b>Examples</b><br />
<a class="left" target="_top" href="ado_examples.asp" >ADO Examples</a><br />
<br />
<b>Exam</b><br />
<a class="left" target="_top" href="../cert/default.asp" >ADO Exam</a><br />
<br />
<b>Selected Reading</b><br />
<a class="left" target="_top" href="../browsers/browsers_stats.asp">Web Statistics</a><br />
<a class="left" target="_top" href="../site/site_glossary.asp">Web Glossary</a><br />
<a class="left" target="_top" href="../hosting/default.asp">Web Hosting</a><br />
<a class="left" target="_top" href="../quality/default.asp">Web Quality</a><br /><br />
<a class="left" target="_top" href="../forum/default.asp">W3Schools Forum</a><br /><br />
<a class="left" target="_top" href="../about/about_helping.asp">Helping W3Schools</a><br /><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3440800076797949";
/*LeftLinkUnit*/
google_ad_slot = "4854527104";
google_ad_width = 120;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="../../pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
<td valign="top">
<table style="border: 1px solid gray" width="100%" bgcolor="#FFFFFF" border="0" cellpadding="5" cellspacing="0">
<tr>
<td>
<h1>ADO Status Property</h1>
<hr />
<a href="ado_ref_field.asp"><img class="navup" src="../images/up.gif" alt="Field Object Reference" border="0" /> Complete Field Object Reference</a>
<hr />
<p>The Status property returns a <a href="#fieldstatusenum"> FieldStatusEnum</a>
value that indicates the status of a Field object. Default value is adFieldOK.
</p>
<p>
If any updates fail then an error is returned and the Status property indicates the combined values of the operation and error status code.
The Status property for each Field can be used to determine why the Field was not added, modified, or deleted.
</p>
<p>Problems with adding, modifying, or deleting a Field are reported through this property.
For example, if a user deletes a Field, it will be marked for deletion in the Fields collection. If the
Update call returns an error because the user tried to delete a Field for which
he does not have permission, the Status for this field will be adFieldPermissionDenied
or adFieldPendingDelete.
</p>
<h3>Syntax</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<td valign="top">
<pre>objfield.Status</pre>
</td>
</tr>
</table>
<h3>Example</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<td valign="top">
<pre><%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"</pre>
<pre>set rs = Server.CreateObject("ADODB.Recordset")
rs.open "Select * from orders", conn</pre>
<pre>response.write(rs.Fields(0).Status)</pre>
<pre>rs.Close
conn.close
%></pre>
</td>
</tr>
</table>
<br />
<hr />
<a name="fieldstatusenum"><h3>FieldStatusEnum Values</h3></a>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr>
<th align="left" valign="top">Constant</th>
<th align="left" valign="top">Value</th>
<th align="left" valign="top">Description</th>
</tr>
<tr>
<td valign="top">adFieldOK</td>
<td valign="top">0</td>
<td valign="top">Default. The field was successfully added
or deleted</td>
</tr>
<tr>
<td valign="top">adFieldCantConvertValue</td>
<td valign="top">2</td>
<td valign="top">The field cannot be retrieved or stored
without loss of data</td>
</tr>
<tr>
<td valign="top">adFieldIsNull</td>
<td valign="top">3</td>
<td valign="top">The provider returned a null value</td>
</tr>
<tr>
<td valign="top">adFieldTruncated</td>
<td valign="top">4</td>
<td valign="top">Variable-length data was truncated when
reading from the data source</td>
</tr>
<tr>
<td valign="top">adFieldSignMismatch</td>
<td valign="top">5</td>
<td valign="top">The data value returned by the provider was
signed, but the data type of the ADO field value was unsigned</td>
</tr>
<tr>
<td valign="top">adFieldDataOverflow</td>
<td valign="top">6</td>
<td valign="top">The data returned from the provider
overflowed the data type of the field</td>
</tr>
<tr>
<td valign="top">adFieldCantCreate</td>
<td valign="top">7</td>
<td valign="top">The field could not be added because the
provider exceeded a limitation</td>
</tr>
<tr>
<td valign="top">adFieldUnavailable</td>
<td valign="top">8</td>
<td valign="top">The provider could not determine the
value when reading from the data source</td>
</tr>
<tr>
<td valign="top">adFieldPermissionDenied</td>
<td valign="top">9</td>
<td valign="top">The field cannot be modified because it
is read-only</td>
</tr>
<tr>
<td valign="top">adFieldIntegrityViolation</td>
<td valign="top">10</td>
<td valign="top">The field cannot be modified because it
is a calculated or derived entity</td>
</tr>
<tr>
<td valign="top">adFieldSchemaViolation</td>
<td valign="top">11</td>
<td valign="top">The value violated the data source schema
constraint for the field</td>
</tr>
<tr>
<td valign="top">adFieldBadStatus</td>
<td valign="top">12</td>
<td valign="top">An invalid status value was sent from ADO
to the OLE DB provider</td>
</tr>
<tr>
<td valign="top">adFieldDefault</td>
<td valign="top">13</td>
<td valign="top">The default value for the field was used
when setting data</td>
</tr>
<tr>
<td valign="top">adFieldIgnore</td>
<td valign="top">15</td>
<td valign="top">This field was skipped when setting data
values in the source</td>
</tr>
<tr>
<td valign="top">adFieldDoesNotExist</td>
<td valign="top">16</td>
<td valign="top">The field does not exist</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -