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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ch23.htm

?? Learning language of Visual C++6
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
procedure, if they don't involve the parameters to the function or the values it
returns, will take effect without compiling and linking the C++ program.</P>
<P>There is a downside, however. It can be very difficult to track down problems
when you are unsure whether they are in the C++ or the SQL part of your program.
When one developer is doing both parts, learning two different tools and switching
between them makes the job harder than it would be in a single tool. Also, the tools
available for working with SQL lack many features that Visual C++ has offered C++
programmers.</P>
<P>Now, with the Enterprise Edition of Visual C++, you can have the best of both
worlds. You can separate your C++ and SQL for reuse and maintenance but use the editor,
syntax coloring, and even the debugger from Visual C++ to work on your SQL stored
procedures.</P>
<P>
<H2><A NAME="Heading4"></A>Exploring the Publishing Application</H2>
<P>One sample database that comes with SQL Server is called <I>pubs</I>. It tracks
the sales of books and the royalties paid to their authors. In this chapter you will
write a new stored procedure and display the records returned by it in a simple record
view dialog box. SQL Server should be up and running before you start to build the
application.</P>
<P>
<H3><A NAME="Heading5"></A>Setting Up the Data Source</H3>
<P>Before you create the project, you need to create a data source to which it will
connect. On your real projects, this data source might already exist.</P>
<P>Choose Start, Settings, Control Panel and then double-click ODBC. Select the User
DSN tab, as in Figure 23.1, and click the Add button to add a new data source name
(DSN).</P>
<P><A HREF="javascript:popUp('23uvc01.gif')"><B>FIG. 23.1</B></A><B> </B><I>Add a
user data source name.</I></P>
<P>On the next dialog box, choose SQL Server, as in Figure 23.2, and click Finish.
You're several steps away from finishing, no matter what the button says.</P>
<P><A HREF="javascript:popUp('23uvc02.gif')"><B>FIG. 23.2</B></A><B> </B><I>Connect
to a SQL Server.</I></P>
<P>On the next dialog box, fill in a name and description for the data source. Then
drop down the Server box; choose your server or type its name. Figure 23.3 shows
the completed dialog box for a test system with only the sample databases installed.
Click Next.</P>
<P><A HREF="javascript:popUp('23uvc03.gif')"><B>FIG. 23.3</B></A><B> </B><I>Specify
the server.</I></P>
<P>You can choose to connect to the server by using NT authentication or SQL Server
authentication. If you're not sure, talk to your system administrator. Because this
sample was developed on a test machine, SQL Server authentication--with the default
account of sa and no password--is acceptable. Figure 23.4 shows the completed dialog
box. Click Next.</P>
<P><A HREF="javascript:popUp('23uvc04.gif')"><B>FIG. 23.4</B></A><B> </B><I>Security
can be lax on test machines but not in the real world.</I></P>
<P>At this point, you can choose whether to connect this data source name to a single
database on the server or to the server as a whole. If you want to associate this
DSN with only one database, select the top check box and choose your database. If
not, leave the top check box deselected. In either case, leave the rest of the dialog
at the defaults, shown in Figure 23.5. Click Next.</P>
<P><A HREF="javascript:popUp('23uvc05.gif')"><B>FIG. 23.5</B></A><B> </B><I>This
DSN is connected to the entire server, not just one database.</I></P>
<P>Accept the default on the next dialog box, shown in Figure 23.6, and click Next.</P>
<P>Leave both check boxes deselected on the last dialog, shown in Figure 23.7. Click
Finish, and the process really is over.</P>
<P>Figure 23.8 shows the summary of settings from this connection process. It's a
very good idea to test your connection before moving on.</P>
<P><A HREF="javascript:popUp('23uvc06.gif')"><B>FIG. 23.6</B></A><B> </B><I>Character
translations and regional settings need no special treatment in this example.</I></P>
<P><A HREF="javascript:popUp('23uvc07.gif')"><B>FIG. 23.7</B></A><B> </B><I>There's
no need to log slow queries or driver statistics in this example.</I></P>
<P><A HREF="javascript:popUp('23uvc08.gif')"><B>FIG. 23.8</B></A><B> </B><I>Confirm
your choices for the ODBC SQL connection.</I></P>
<P>Click Test Data Source, and you should see something like Figure 23.9. If you
don't, click Cancel to return to the final step of the process and click Back until
you are back to the step you need to adjust. Then come forward again with Next.</P>
<P><A HREF="javascript:popUp('23uvc09.gif')"><B>FIG. 23.9</B></A><B> </B><I>Make
sure your DSN connects properly.</I></P>
<P>When you have tested the connection successfully, click OK on the summary dialog
and then OK on the ODBC Data Source Administrator. Close Control Panel.</P>
<P>
<H3><A NAME="Heading6"></A>Building the Application Shell</H3>
<P>Open Developer Studio and choose File, New and then click the Projects tab. Select
MFC AppWizard (exe) and name the project Publishing, as shown in Figure 23.10. Click
OK to start the AppWizard process.</P>
<P><A HREF="javascript:popUp('23uvc10.gif')"><B>FIG. 23.10</B></A><B> </B><I>Start
AppWizard in the usual way.</I></P>
<P>In Step 1 of AppWizard, choose an SDI application. Click Next to move to Step
2 of AppWizard. As shown in Figure 23.11, select the Database View Without File Support
option. Click Data Source to connect a data source to your application.</P>
<P>Select the ODBC option and from the drop-down box next to it, select the DSN you
just created, as shown in Figure 23.12. Leave the Recordset Type as Snapshot and
click OK to specify the exact data source.</P>
<P><A HREF="javascript:popUp('23uvc11.gif')"><B>FIG. 23.11</B></A><B> </B><I>This
application needs database support but will not have a document.</I></P>
<P><A HREF="javascript:popUp('23uvc12.gif')"><B>FIG. 23.12</B></A><B> </B><I>Your
data source is an ODBC data source name.</I></P>
<P>The SQL Server login dialog appears. Click the Options button to show the enlarged
dialog of Figure 23.13. Choose pubs from the Database drop-down box and enter your
login ID and password at the top of the dialog. Click OK.</P>
<P><A HREF="javascript:popUp('23uvc13.gif')"><B>FIG. 23.13</B></A><B> </B><I>Connect
to the sample pubs database.</I></P>
<P>The Select Database Tables dialog, shown in Figure 23.14, appears. Click on dbo.authors,
dbo.titleauthor, and dbo.titles. Click OK.</P>
<P><A HREF="javascript:popUp('23uvc14.gif')"><B>FIG. 23.14</B></A><B> </B><I>Choose
the authors, titles, and authortitle tables.</I></P>
<P>You are back to Step 2 of AppWizard. Click Next to move to Step 3. Choose No Support
for Compound Documents or ActiveX Controls and click Next to move to Step 4. Click
Next to accept the Step 4 defaults and then Next again to accept the Step 5 defaults.
On Step 6, click Finish. The New Project Information summary, shown in Figure 23.15,
appears. Click OK to create the project.</P>
<P><A HREF="javascript:popUp('23uvc15.gif')"><B>FIG. 23.15</B></A><B> </B><I>Confirm
that your choices are correct before clicking OK.</I></P>
<P>You have now completed a shell of an application that displays database values
in a record view, much like the one discussed in Chapter 22. Nothing you have done
so far has been specific to the Enterprise Edition. That is about to change.</P>
<P>
<H3><A NAME="Heading7"></A>Making a Data Connection</H3>
<P>The database tables you specified are connected to your record set, but they aren't
available for use with the SQL features of the Enterprise Edition. You need to make
a data connection to connect the database to your application. Follow these steps
to make the connection:</P>

<DL>
	<DT></DT>
	<DD><B>1. </B>Choose Project, Add to Project, New.
	<P>
	<DT></DT>
	<DD><B>2. </B>Click the Projects tab.
	<P>
	<DT></DT>
	<DD><B>3. </B>As shown in Figure 23.16, select a Database Project, name it <B>PubDB</B>,
	and select the Add to Current Workspace radio button. Click OK.
	<P>
</DL>

<P><A HREF="javascript:popUp('23uvc16.gif')"><B>FIG. 23.16</B></A><B> </B><I>Create
a subproject within this project.</I></P>

<DL>
	<DT><I></I></DT>
	<P>
	<DD><B>4. </B>The Select Data Source dialog appears. Click the Machine Data Source
	tab, choose the DSN you created (shown in Figure 23.17), and click OK.
	<P>
</DL>

<P><A HREF="javascript:popUp('23uvc17.gif')"><B>FIG. 23.17</B></A><B> </B><I>Connect
to the local server.</I></P>

<DL>
	<DT><I></I></DT>
	<P>
	<DD><B>5. </B>The SQL Server Login dialog appears. As before, specify your login
	ID and password and make sure the pubs database is selected. Click OK to complete
	the data connection.
	<P>
</DL>

<P>In the Workspace pane on the left of the screen, a new tab has appeared. Figure
23.18 shows the new DataView. Expand the Tables section and expand authors to show
the columns within the table. Double-click the authors table, and you can see your
data on the right in Figure 23.18.</P>
<P>Also featured in Figure 23.18 is the Query toolbar, with the following buttons:</P>

<UL>
	<LI><I>Show Diagram Pane</I> toggles the Query Designer diagram pane (discussed in
	the next section).
	<P>
	<LI><I>Show Grid Pane</I> toggles the Query Designer grid pane (discussed in the
	next section).
	<P>
	<LI><I>Show SQL Pane</I> toggles the Query Designer SQL pane (discussed in the next
	section).
</UL>

<P><A HREF="javascript:popUp('23uvc18.gif')"><B>FIG. 23.18</B></A><B> </B><I>The
DataView shows you the database structure and can display your data in the working
area.</I></P>

<UL>
	<LI><I>Show Results Pane</I> toggles the Query Designer results pane (discussed in
	the next section).
	<P>
	<LI><I>Change Type</I> creates a SELECT, INSERT, UPDATE, or DELETE query in the four
	panes of Query Designer.
	<P>
	<LI><I>Run</I> executes your SQL.
	<P>
	<LI><I>Verify SQL Syntax</I> checks the syntax of the SQL you have written.
	<P>
	<LI><I>Sort Ascending</I> displays records from the low value of a selected column
	to high.
	<P>
	<LI><I>Sort Descending</I> displays records from the high value of a selected column
	to low.
	<P>
	<LI><I>Remove Filter</I> shows all the records instead of only those that meet the
	filter specifications.
	<P>
	<LI><I>Group By</I> adds a GROUP BY condition to the query being built.
	<P>
	<LI><I>Properties</I> displays information about a column or table.
</UL>

<H3><A NAME="Heading8"></A>Working with Query Designer</H3>
<P>When you double-click a table name, such as authors, in the DataView to display
all the columns and all the records, you are actually executing a simple SQL query,
as follows:</P>
<P>
<PRE>SELECT authors.* FROM authors
</PRE>
<P>The results of this query appear in the results pane, which is the only one of
the four Query Designer panes to be displayed, by default. This query was built for
you by Query Designer and means <I>show all the columns and records of the</I> authors<I>
table</I>. Figure 23.19 shows the four panes of Query Designer as they appear when
you first make the data connection. To see all four panes, use the toolbar buttons
to toggle them on. You can adjust the vertical size of each pane but not the horizontal.</P>
<P>To change your query, deselect * (All Columns) in the diagram pane (at the top
of Figure 23.19) and then select au_lname, au_fname, and phone. The values in the
results pane become gray to remind you that these aren't the results of the query
you are now building. As you make these selections in the diagram pane, the other
panes update automatically, as shown in Figure 23.20.</P>
<P><A HREF="javascript:popUp('23uvc19.gif')"><B>FIG. 23.19</B></A><B> </B><I>The
DataView shows you the database structure and can display your data in the working
area.</I></P>
<P>Highlight phone in the diagram pane and click the Sort Ascending button on the
Query toolbar. This will sort the results by phone number. Click the Run button on
the Query toolbar to execute the SQL that has been built for you. Figure 23.21 shows
what you should see, including the new values in the results pane.</P>
<P>
<H3><A NAME="Heading9"></A>Stored Procedures</H3>
<P>The capability to create simple SQL queries quickly, even if your SQL skills aren't
strong, is an amazing aspect of the Enterprise Edition. However, using stored procedures
is where the real payoff of this software becomes apparent.</P>
<P><A HREF="javascript:popUp('23uvc20.gif')"><B>FIG. 23.20</B></A><B> </B><I>You
can build simple queries even if you don't know any SQL.</I></P>
<P><A HREF="javascript:popUp('23uvc21.gif')"><B>FIG. 23.21</B></A><B> </B><I>Running
your SQL queries is a matter of a single click.</I></P>
<P>Collapse the tables section in the DataView and expand the Stored Procedures section.
This shows all the stored procedures that are kept in the database and are available
for you to use. Double-click reptq2 to display the procedure. One thing you probably
notice immediately is the syntax coloring in the editor window. The colors used are</P>

<UL>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美另类z0zxhd电影| 久久综合综合久久综合| 成人国产精品免费| 亚洲日本电影在线| 欧美怡红院视频| 午夜精品久久久久| 精品剧情v国产在线观看在线| 蜜桃久久精品一区二区| 欧美mv日韩mv亚洲| 国产91丝袜在线播放九色| 国产精品嫩草99a| 一本色道亚洲精品aⅴ| 一区二区三区免费看视频| 欧美精品在线一区二区三区| 日韩高清电影一区| 久久综合九色综合97婷婷女人| 国产一区二区日韩精品| 国产精品传媒视频| 666欧美在线视频| 国产成人av电影在线| 亚洲在线视频一区| 精品国产精品一区二区夜夜嗨| 国产成人午夜电影网| 一区二区三区视频在线观看| 久久久久久久网| 国产日产欧美一区二区三区| 99久久精品国产一区二区三区| 一区二区三区精品在线| 精品国产精品一区二区夜夜嗨| av不卡在线播放| 欧美aaaaaa午夜精品| 国产精品久久久久久久久晋中 | 一本久久综合亚洲鲁鲁五月天| 亚洲国产成人av| 国产情人综合久久777777| 欧美视频一区二| 国产高清亚洲一区| 天天色 色综合| 成人免费小视频| 久久综合久色欧美综合狠狠| 在线国产亚洲欧美| 国产成人午夜精品影院观看视频 | 日韩国产高清在线| 国产精品成人一区二区三区夜夜夜| 91精品蜜臀在线一区尤物| 欧美一区二区在线免费观看| 国产精品影音先锋| 日韩中文字幕1| 亚洲激情一二三区| 国产精品网站在线| 精品美女被调教视频大全网站| 色屁屁一区二区| 成人午夜视频在线观看| 精品一区二区三区久久| 亚洲第一久久影院| 依依成人综合视频| 中文字幕第一页久久| 精品国产乱码久久久久久蜜臀| 欧美日韩一区小说| 色琪琪一区二区三区亚洲区| 成人午夜电影小说| 国产高清无密码一区二区三区| 蜜桃视频一区二区三区在线观看| 夜夜精品视频一区二区| 中文字幕一区在线观看视频| 久久久精品蜜桃| 欧美精品一区二区三区很污很色的| 欧美日韩亚洲高清一区二区| 色噜噜久久综合| 91在线国内视频| 91视视频在线观看入口直接观看www | 欧美一二三四区在线| 在线亚洲免费视频| 91社区在线播放| 97精品国产露脸对白| 成人免费毛片嘿嘿连载视频| 成人午夜在线视频| 99视频有精品| 91麻豆精品视频| 一本大道久久a久久综合婷婷| 不卡av免费在线观看| 97国产精品videossex| 99精品视频中文字幕| 日本韩国欧美在线| 91麻豆免费视频| 欧美日韩免费视频| 91麻豆精品国产综合久久久久久| 欧美绝品在线观看成人午夜影视| 欧美日韩免费在线视频| 日韩欧美色综合| 久久久亚洲欧洲日产国码αv| 亚洲国产精品ⅴa在线观看| 国产精品久久777777| 一区二区三区**美女毛片| 偷窥少妇高潮呻吟av久久免费| 秋霞电影网一区二区| 国产精品一区免费在线观看| 丁香六月综合激情| 欧美性生活久久| 日韩欧美一级二级三级| 久久久久久久久久久久久久久99 | 国产欧美一区二区精品性色| 在线免费不卡视频| 欧美一卡二卡在线观看| 日韩欧美成人一区| 日韩精品中午字幕| 久久久www成人免费无遮挡大片| 久久久久97国产精华液好用吗 | 精品国产网站在线观看| 精品欧美一区二区三区精品久久| 精品人伦一区二区色婷婷| 国产午夜精品理论片a级大结局| 久久精品人人爽人人爽| 国产精品视频你懂的| 国产亚洲精品7777| 亚洲最大色网站| 免费成人在线网站| 国内精品不卡在线| 97国产一区二区| 制服.丝袜.亚洲.另类.中文| 欧美激情在线免费观看| 亚洲免费观看高清完整版在线 | 国产精品美女久久久久久2018| 中文字幕一区av| 午夜视频久久久久久| 极品少妇xxxx偷拍精品少妇| 成人av午夜电影| 欧美久久免费观看| 久久老女人爱爱| 亚洲精品视频在线| 亚洲成人中文在线| 91色.com| 日韩精品综合一本久道在线视频| 欧美极品xxx| 亚洲成人动漫在线免费观看| 免费久久99精品国产| 91丨porny丨国产入口| 欧美成人国产一区二区| 亚洲欧洲精品一区二区三区不卡| 亚洲国产精品一区二区www | 日本va欧美va精品| 成人性生交大合| 欧美一区二区观看视频| 国产精品乱人伦中文| 国产一区二区三区高清播放| 在线视频你懂得一区二区三区| 久久综合狠狠综合久久激情| 亚洲免费在线观看视频| 国产精品一二一区| av午夜精品一区二区三区| 2023国产精品| 亚欧色一区w666天堂| 成人午夜电影久久影院| 日韩一区二区免费在线电影| 亚洲日本在线a| 99re这里只有精品视频首页| 久久先锋影音av鲁色资源 | 亚洲最新视频在线观看| 风间由美一区二区三区在线观看| 欧美主播一区二区三区美女| 亚洲人成精品久久久久久| 国产乱码精品1区2区3区| 51精品秘密在线观看| 玉米视频成人免费看| 成人av免费在线播放| 国产精品乱人伦| 国产一区二区三区在线看麻豆| 欧美日韩高清一区二区三区| 久久综合色天天久久综合图片| 日本成人在线一区| 欧美美女视频在线观看| 亚洲精品精品亚洲| 成人性视频网站| 国产精品久久久久久久久免费相片| 国产一区二区调教| 精品久久久久久久人人人人传媒 | 久久精品在线观看| 精品中文字幕一区二区| 欧美乱熟臀69xxxxxx| 日韩黄色免费电影| 欧美久久高跟鞋激| 亚洲成人av电影| 欧美日韩日日骚| 日韩高清不卡一区二区三区| 精品日韩在线观看| 国产综合色产在线精品| 26uuu亚洲综合色欧美| 麻豆高清免费国产一区| 精品处破学生在线二十三| 韩国女主播成人在线观看| 欧美成人精品高清在线播放| 精品亚洲成a人在线观看 | 色噜噜狠狠色综合欧洲selulu | 中文字幕日韩一区二区| 国产一区不卡视频| 中文字幕综合网| 91福利在线看| 亚洲一二三四区不卡| 这里是久久伊人| 另类调教123区|