亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch15.htm

?? 21天學會VC的英文版
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
last parameter for the first version. It is the fourth and fifth parameters thatare unique to these macros. The fourth parameter specifies the precision of the valuein this field of the record set. The fifth parameter specifies the scale of the value.Both of these parameters are crucial in correctly converting the value to and froma variant data type.</P><P><H4>The ADO_VARIABLE_LENGTH_ENTRY Macros</H4><P>The final series of macros is the ADO_VARIABLE_LENGTH_ENTRY macros. You use thisseries of macros with database fields that are likely to vary in length. With a SQL-baseddatabase, you want to use this series of macros with any varchar (variable-lengthcharacter string) columns. There are three versions of this macro. In all three versions,the first four parameters are the same, and the final parameter is the same. It isthe parameters between them that vary.</P><P>The first parameter is the ordinal position of the column in the record set asreturned by the SQL query. The second parameter is the data type. The third parameteris the variable in which the data value should be placed. The fourth parameter forall versions of the macro is the size of the variable into which the value is tobe placed. This prevents the data from being written past the end of the variablethat you defined for it to be placed in. As with the previous macros, the final parameterspecifies whether the field is updateable.</P><P>In the first version of this macro, there are two parameters between the fourthand final parameters. The second version of this macro only has the first of thesetwo parameters, and the third version only has the second of these two parameters.The first of these two parameters is the status variable for use with this field.The second of these two parameters is the length of the field in the database. Thepreceding example used the second version of this macro.</P><P><H3><A NAME="Heading10"></A>Updating Records</H3><P>When you need to update values in a record in the recordset, how you handle itdepends on which of the two methods you used to retrieve the data elements from therecordset. If you retrieved each field and converted it from a variant yourself,you need to update each individual field that has been changed. The update is doneusing the Recordset object's Update method, which takes two variables, the fieldbeing updated and the new value for the field. You could make this update using thefollowing code:</P><P><PRE>_variant_t vName, vValue;vName.SetString(&quot;FirstName&quot;);vValue.SetString(&quot;John&quot;);pRs-&gt;Update(vName, vValue);</PRE><P>If you created your record class and bound it to the recordset, updating the recordis a little simpler. Once you have copied the new values into the variables in therecord class, you can call the record-bound version of the Update function, as inthe following:</P><P><PRE>picRs-&gt;Update(&amp;m_rsRecSet);</PRE><P>This updates the record in the Recordset object to be updated with the valuesin the record class that you have bound to the set.</P><P><H3><A NAME="Heading11"></A>Adding and Deleting</H3><P>Adding and deleting records from an ADO recordset is similar to how you accomplishit in other database access technologies. However, there are some slight subtletiesto how you perform the addition of new records.</P><P>For deleting the current record, you can call the Recordset object's Delete method.This method requires a single parameter that specifies how the delete is supposedto be done. Most likely, you'll pass the adAffectCurrent value so that only the currentrecord in the recordset is deleted, as in the following code:</P><P><PRE>pRs-&gt;Delete(adAffectCurrent);pRs-&gt;MovePrevious();</PRE><P>As with any other database access technology, once you've deleted the currentrecord, there is no current record, so you need to navigate to another record beforeallowing the user to do anything else.</P><P>When you are adding a new record, you can call the Recordset object's AddNew method.Once you have added a new record, the new record is the current record in the recordset. If you check the variables in the record class that you created, you'll findthat they are all empty. However, you cannot just begin entering data values intothese fields. To allow the user to immediately enter the various data elements inthe new record, you'll blank out the values in the record class and pass this variableas the only parameter to the Add New class. You need to call it through the record-bindinginterface pointer, as in the following example:</P><P><PRE>CString strBlank = &quot; &quot;;COleDateTime dtBlank;m_rsRecSet.m_lAddressID = 0;strcpy(m_rsRecSet.m_szFirstName, (LPCTSTR)strBlank);m_rsRecSet.m_dtBirthdate = (DATE)dtBlank;m_rsRecSet.m_bSendCard = VARIANT_FALSE;picRs-&gt;AddNew(&amp;m_rsRecSet);</PRE><P>This allows you to provide the user with a blank record, ready for editing. Oncethe user has entered all the various values in the record, copy all these valuesback to the record variable. Then, call the Update method to save the record.</P><P><H3><A NAME="Heading12"></A>Closing the Recordset and Connection Objects</H3><P>Once you finish working with a record set, you'll close the record set by callingthe Close method, as follows:</P><P><PRE>pRs-&gt;Close();</PRE><P>Once you finish all database interaction for the entire application, you'll alsoclose the connection to the database by calling the Connection object's Close method:</P><P><PRE>pConn-&gt;Close();</PRE><H2><A NAME="Heading13"></A>Building a Database Application Using ADO</H2><P>The sample application that you will build today is another simple database application,basically the same as the one you built yesterday. You'll use ADO to retrieve a setof records from an Access database, providing functionality to navigate the recordset. The user will be able to make changes to the data in the record set, and thosechanges will be reflected in the database as well. The user will also be able toadd new records to the record set and delete records as desired. You will accomplishall of this using ADO as the means of accessing the database, which will go throughthe ODBC driver that was configured yesterday.</P><P><H3><A NAME="Heading14"></A>Creating the Application Shell</H3><P>The application that you will build today will be an SDI-style application. Aswith sev-eral other sample applications that you build in the course of reading thisbook, everything that you do in today's application is just as applicable to an MDIor dialog-style application. To start the application, you'll use the MFC AppWizardto build the application shell, using most of the SDI-style application default settings.</P><P>To start your application, create a new AppWizard project, naming the projectsomething appropriate, such as DbAdo. Specify on the first panel of the AppWizardthat you are building an SDI-style application. Accept all the default settings forsteps 2 through 5, being sure to leave the second step stating that you want no databasesupport included in the application. On the final AppWizard step, specify that theview class should be inherited from the CFormView class.</P><P>Once you finish creating your application shell, design the main dialog form foruse in your application. Add the standard controls for each of the fields in theAddresses table from the database you used yesterday (or if you used a differentdatabase yesterday, add controls for all the fields in the table that you used),as shown in Figure 15.6. Configure the controls using the properties listed in Table15.1.</P><BLOCKQUOTE>	<P><HR><STRONG>TIP:</STRONG> If you want to save a little time when building the example, you can	leave out most of the controls and database fields from the application. The key	fields that you'll need to include on the screen are ID, First and Last Names, Birthdate,	and Send Card. If you want to leave out the other fields from the application, that's	fine. You will need to include these fields in the CCustomRs class that you create	in this chapter.<HR></BLOCKQUOTE><P><A HREF="javascript:popUp('15fig06.gif')"><B>FIGURE 15.6.</B></A><B> </B><I>Themain form layout.</I></P><P><I></I><H4>TABLE 15.1. CONTROL PROPERTY SETTINGS.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"><I>Object</I></TD>		<TD ALIGN="LEFT"><I>Property</I></TD>		<TD ALIGN="LEFT"><I>Setting</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Address ID		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_ADDRESSID		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">First Name		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_FIRSTNAME		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Last Name		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_LASTNAME		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Spouse Name		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_SPOUSENAME		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Address		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_ADDRESS		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">City		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_CITY		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">State Or Province		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_STATEORPROVINCE		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Postal Code		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Edit Box		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_EDIT_POSTALCODE		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">Static Text		</TD>		<TD ALIGN="LEFT">ID		</TD>		<TD ALIGN="LEFT">IDC_STATIC		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<P>		</TD>		<TD ALIGN="LEFT">Caption		</TD>		<TD ALIGN="LEFT">Country		</TD>	</TR>	<TR ALIG

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品嫩模私拍在线| 精品国产第一区二区三区观看体验| 欧美性大战久久久久久久| 色综合天天综合网天天狠天天| 日韩女优毛片在线| 一区二区三区国产精华| 国产成人精品www牛牛影视| 在线播放国产精品二区一二区四区| 国产精品美女久久久久久久久 | 精品一区二区日韩| 91福利精品第一导航| 国产精品视频在线看| 激情综合网av| 欧美精品777| 午夜久久久久久久久久一区二区| 成人av网站大全| 国产亚洲一区二区三区在线观看 | 精品一区二区三区在线视频| 欧洲精品一区二区| 亚洲视频小说图片| 99精品黄色片免费大全| 欧美激情在线一区二区三区| 国产一区二区在线电影| 精品黑人一区二区三区久久| 蜜臀久久99精品久久久久宅男 | 亚洲成av人片观看| 日本精品一级二级| 亚洲男女一区二区三区| 91一区二区三区在线观看| 国产精品乱码人人做人人爱| 国产精品系列在线播放| 久久婷婷国产综合国色天香| 国产在线视频一区二区三区| 精品国产凹凸成av人导航| 精品亚洲免费视频| 久久综合色天天久久综合图片| 免费一级欧美片在线观看| 日韩精品专区在线影院重磅| 麻豆免费看一区二区三区| 久久新电视剧免费观看| 成人一区二区视频| 亚洲乱码国产乱码精品精的特点| 色婷婷国产精品久久包臀| 亚洲成av人片在www色猫咪| 在线电影一区二区三区| 精品一区二区三区免费观看| 精品久久久久久久一区二区蜜臀| 国产精品99久久久| 亚洲精品乱码久久久久久日本蜜臀| 99riav一区二区三区| 亚洲国产sm捆绑调教视频| 欧美一区日本一区韩国一区| 激情都市一区二区| 亚洲手机成人高清视频| 欧美视频日韩视频| 久久99精品久久久久久久久久久久 | 国产亚洲综合在线| av不卡一区二区三区| 亚洲综合色噜噜狠狠| 91精品国产一区二区| 国产a视频精品免费观看| 亚洲精品成人a在线观看| 欧美一区二区精美| 99re成人精品视频| 日本欧美加勒比视频| 国产精品国产三级国产a| 欧美日韩1234| 成人午夜大片免费观看| 亚洲地区一二三色| 亚洲国产精华液网站w| 欧美日本国产一区| 成人久久18免费网站麻豆| 亚洲国产视频在线| 中文天堂在线一区| 日韩免费观看2025年上映的电影| 懂色av一区二区三区蜜臀| 亚洲va天堂va国产va久| 日本一区二区电影| 日韩欧美中文字幕精品| 91免费看`日韩一区二区| 久久精品999| 亚洲一区二区高清| 国产精品福利电影一区二区三区四区| 7777精品伊人久久久大香线蕉| 国产黑丝在线一区二区三区| 日韩国产精品久久| 亚洲精品日日夜夜| 国产女人18毛片水真多成人如厕| 欧美日韩国产高清一区二区三区| 99视频超级精品| 国产一区二区三区国产| 天堂蜜桃一区二区三区| 亚洲男人天堂av网| 国产精品全国免费观看高清 | 国产精品免费看片| 欧美大片拔萝卜| 91精品国产综合久久精品app| 91在线porny国产在线看| 国产一区二区剧情av在线| 日韩成人午夜电影| 偷拍亚洲欧洲综合| 亚洲国产精品麻豆| 亚洲免费观看高清| 国产精品国产三级国产aⅴ中文| 久久综合九色欧美综合狠狠| 日韩欧美激情四射| 欧美肥妇bbw| 在线电影欧美成精品| 欧美日韩久久久一区| 欧美最新大片在线看 | 成人性色生活片免费看爆迷你毛片| 麻豆91精品视频| 免费av网站大全久久| 麻豆成人久久精品二区三区红 | 成人av在线影院| 成人高清免费观看| 成人精品视频网站| 成人免费视频网站在线观看| 国产91丝袜在线播放| 成人美女视频在线观看| 国产98色在线|日韩| www.亚洲精品| 91在线一区二区| 在线免费亚洲电影| 欧美日韩一区二区三区四区五区| 欧美日韩黄色影视| 日韩午夜在线观看| 久久久久综合网| 国产精品灌醉下药二区| 亚洲人xxxx| 天天影视网天天综合色在线播放 | youjizz久久| 一本大道av伊人久久综合| 欧美在线不卡一区| 欧美精品18+| 久久久美女毛片| 亚洲美女在线国产| 日韩精品乱码av一区二区| 国内偷窥港台综合视频在线播放| 国产成都精品91一区二区三| 91久久精品日日躁夜夜躁欧美| 精品视频全国免费看| 日韩亚洲欧美成人一区| 亚洲国产精品精华液2区45| 亚洲欧美偷拍卡通变态| 日韩中文字幕区一区有砖一区| 国内精品在线播放| 91国偷自产一区二区开放时间| 欧美日韩三级视频| 国产婷婷一区二区| 亚洲午夜激情av| 国产精品99久久久久久久女警| 色猫猫国产区一区二在线视频| 日韩区在线观看| 亚洲少妇最新在线视频| 麻豆精品一区二区av白丝在线| 99精品视频在线观看| 欧美成人一级视频| 亚洲女与黑人做爰| 国产又黄又大久久| 欧美人妇做爰xxxⅹ性高电影| 国产亚洲综合在线| 人人精品人人爱| 972aa.com艺术欧美| 久久尤物电影视频在线观看| 亚洲一区欧美一区| 成人97人人超碰人人99| 精品日产卡一卡二卡麻豆| 一区二区三区不卡视频在线观看| 国产精品白丝av| 欧美一级片在线| 亚洲第一主播视频| 91视频在线观看免费| 国产日韩欧美制服另类| 美女视频一区二区三区| 欧美日韩日日夜夜| 亚洲精品精品亚洲| www.亚洲色图.com| 久久久美女艺术照精彩视频福利播放| 日韩激情视频网站| 欧美日韩高清在线播放| 一区二区三区蜜桃| 99久久精品国产导航| 国产女人aaa级久久久级| 国产麻豆精品95视频| 精品国产污污免费网站入口 | 亚洲一区二区在线视频| av综合在线播放| 日本一区二区不卡视频| 国产一区二区三区免费在线观看 | 青青国产91久久久久久| 欧美性色综合网| 亚洲综合一区二区三区| 91麻豆文化传媒在线观看| 中文字幕av一区二区三区高| 丁香桃色午夜亚洲一区二区三区| 久久九九全国免费| 春色校园综合激情亚洲| 国产清纯美女被跳蛋高潮一区二区久久w| 免费在线看成人av|