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

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

?? odbc-e2.htm

?? odbc教程真的很不錯
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<html>
<head>
<title>ODBC Programming Tutorial: Connecting to the Data Source</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#000000" text="#FFFFFF" link="#FFFFCC" vlink="#FFCCCC" alink="#CCFFCC">
<h1 align="center"><font face="Tahoma" color="#FFFFCC">Connecting to Data Source</font></h1>
<p align="left"><font face="Tahoma" size="-1">In this tutorial, we learn the mechanics 
  of using ODBC APIs.</font></p>
<p align="left"><font face="Tahoma" size="-1">Your program doesn't talk directly 
  to the ODBC drivers. It talks to the ODBC manager. The ODBC manager defines 
  a set of APIs your program can call to direct it to do the job for you. In your 
  program, you need to include odbc32.inc and odbc32.lib. Also you need to include 
  windows.inc.</font></p>
<p align="left"><font face="Tahoma" size="-1">The steps in connecting to the data 
  source are as follows:</font></p>
<ol>
  <li><font face="Tahoma" size="-1"><b><font color="#FFFFCC">Allocate an environment 
    handle</font></b>. You need to do this only once per ODBC session. Once you 
    obtain the handle, you can modify the environment properties to suit your 
    particular needs. You can think of this step as creating the workspace for 
    your DB job.</font></li>
  <li><font color="#FFFFCC" face="Tahoma" size="-1"><b>Indicate what version of 
    ODBC your program wants to use</b></font><font face="Tahoma" size="-1">. You 
    can choose between ODBC version 2.x and 3.x. They are different in many respects 
    thus this step is necessary so the ODBC manager can decide which syntax it 
    should use to communicate with your program and interpret the commands from 
    your program.</font></li>
  <li><font face="Tahoma" size="-1"><b><font color="#FFFFCC">Allocate a connection 
    handle</font></b>. This step can be viewed as creating an empty connection. 
    You haven't specify what driver you want to use and which database you need 
    to connect. Such information will be filled in later.</font></li>
  <li><font face="Tahoma" size="-1"><b><font color="#FFFFCC">Establish a connection</font></b>. 
    You call an ODBC function to establish the connection.</font></li>
</ol>
<p><font face="Tahoma" size="-1">When you are done with the connection, you must 
  close and destroy it in the following steps:</font></p>
<ol>
  <li><font color="#FFFFCC" face="Tahoma" size="-1"><b>Disconnect from the data 
    source</b></font><font face="Tahoma" size="-1">.</font></li>
  <li><font face="Tahoma" size="-1"><b><font color="#FFFFCC">Destroy the connection 
    handle</font></b>.</font></li>
  <li><font color="#FFFFCC" face="Tahoma" size="-1"><b>Destroy the environment 
    handle</b></font><font face="Tahoma" size="-1"> (if you don't want to use 
    this environment for more connections)</font></li>
</ol>
<h4><font face="Tahoma" color="#CCFFCC">Allocating a Handle</font></h4>
<p><font face="Tahoma" size="-1">In ODBC versions prior to 3.x, you need to call 
  separate functions for allocating environment, connection, and statement handles 
  (<font color="#FFFFCC"><b>SQLAllocEnv</b></font>, <font color="#FFFFCC"> <b>SQLAllocConnect</b></font>, 
  <font color="#FFFFCC"><b>SQLAllocStmt</b></font>). Now under ODBC 3.x, those 
  functions are superseded by <font color="#FFFFCC"><b>SQLAllocHandle</b></font> 
  which has the following syntax:</font></p>
<blockquote> 
  <pre><font face="Tahoma"><b><font color="#CCFFCC">SQLRETURN SQLAllocHandle( SQLSMALLINT HandleType,      
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQLHANDLE InputHandle, 
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SQLHANDLE * OutputHandlePtr
     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); </font></b></font></pre>
</blockquote>
<p><font face="Tahoma" size="-1">The above line may look daunting. I will simplify 
  it for you.</font> </p>
<blockquote> 
  <pre><font face="Tahoma" color="#CCFFCC"><b>SQLAllocHandle proto HandleType:DWORD, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InputHandle:DWORD, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputHandlePtr:DWORD</b></font></pre>
</blockquote>
<p><font color="#FFFFCC" face="Tahoma" size="-1"><b>SQLRETURN</b></font><font face="Tahoma" size="-1"> 
  is defined as type <font color="#FFFFCC"><b>SQLSMALLINT</b></font>. And<font color="#FFFFCC"><b> 
  SQLSMALLINT</b></font> is defined as a short integer, ie. a word (16 bits). 
  So the function returns the value in <font color="#FFFFCC"><b>ax</b></font>, 
  not<font color="#FFFFCC"><b> eax</b></font>. This is important. However, parameter 
  passing to a function under Win32 is done via the 32-bit stack. Thus even if 
  the parameter is defined as a word-size one, you must extend it to 32-bit. That's 
  why <font color="#CCFFCC"><b>HandleType</b></font> is a dword instead of a word. 
  You can check with the import lib, <font color="#CCFFCC"> <b>odbc32.lib</b></font>. 
  The entry for <font color="#FFFFCC"><b>SQLAllocHandle</b></font> is <font color="#CCFFCC"><b>_SQLAllocHandle@12</b></font>. 
  Which means the combined size of parameters for this function is 12 bytes (3 
  dwords). However, this doesn't mean that the C function prototype is incorrect. 
  <font color="#FFFFCC"> <b>SQLAllocHandle</b></font> will only use the low word 
  of <font color="#CCFFCC"><b>HandleType</b></font> and ignore the high word. 
  Thus the C function prototype is <font color="#CCCCFF"><i><b>functionally</b></i></font> 
  correct while our asm function prototype reflects practicality.</font></p>
<p><font face="Tahoma" size="-1">With SQL type discussion out of the way, we can 
  turn our attention to the function parameters and the return value.</font></p>
<ul>
  <li><font face="Tahoma" size="-1"><b><font color="#CCFFCC">HandleType</font></b> 
    is a constant that defines what type of handle you want to allocate. The possible 
    values are:</font></li>
</ul>
<table border="1" cellspacing="1" cellpadding="3" align="center">
  <tr> 
    <td bgcolor="#0000CC"><font face="Tahoma" size="-1"><b>SQL_HANDLE_ENV </b></font></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">Environment handle</font></td>
  </tr>
  <tr> 
    <td bgcolor="#0000CC"><font face="Tahoma" size="-1"><b>SQL_HANDLE_DBC</b></font></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">Connection handle</font></td>
  </tr>
  <tr> 
    <td bgcolor="#0000CC"><font face="Tahoma" size="-1"><b>SQL_HANDLE_STMT</b></font></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">Statement handle</font></td>
  </tr>
  <tr> 
    <td bgcolor="#0000CC"><font face="Tahoma" size="-1"><b>SQL_HANDLE_DESC</b></font></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">Descriptor handle</font></td>
  </tr>
</table>
<blockquote> 
  <p><font face="Tahoma" size="-1">A descriptor is a collection of metadata that 
    describes the parameters of an SQL statement or the columns of a result set, 
    as seen by the application or driver</font></p>
</blockquote>
<ul>
  <li><font color="#CCFFCC" face="Tahoma" size="-1"><b>InputHandle</b></font><font face="Tahoma" size="-1"> 
    is the handle of the parent &quot;context&quot;. That is, if you want to allocate 
    a connection handle, you need to pass an environment handle because the connection 
    will be made in the context of that environment. If you want to allocate an 
    environment handle, this parameter must be <font color="#CCFFCC"><b>SQL_HANDLE_NULL</b></font> 
    (beware of the value of <font color="#CCFFCC"><b>SQL_HANDLE_NULL</b></font> 
    in windows.inc version 1.18 and below. It is defined improperly as 0L. You 
    need to delete the &quot;L&quot; else your program will not assemble. The 
    fault is mine alone since I'm the one who updated the SQL/ODBC part of windows.inc.) 
    because there is no parent context for an environment. As for the statement 
    and descriptor handles, you must pass the connection handle as this parameter 
    as both statement and descriptor occur in the context of a connection</font></li>
  <li><font color="#CCFFCC"><b><font face="Tahoma" size="-1">OutputHandlePtr</font></b></font><font face="Tahoma" size="-1"> 
    points to a dword variable that will receive the allocated handle if the call 
    is successful.</font></li>
</ul>
<p><font face="Tahoma" size="-1">The possible return values of <font color="#FFFFCC"><b>SQLAllocHandle</b></font> 
  can be:</font></p>
<table border="1" cellspacing="1" cellpadding="3" align="center">
  <tr> 
    <td bgcolor="#003399"><b><font face="Tahoma" size="-1">SQL_SUCCESS</font></b></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">The function completed 
      successfully.</font></td>
  </tr>
  <tr> 
    <td bgcolor="#003399"><b><font face="Tahoma" size="-1">SQL_SUCCESS_WITH_INFO</font></b></td>
    <td bgcolor="#006666"><font face="Tahoma" size="-1">The function completed 
      successfully but with possible non-fatal errors (warnings). </font></td>
  </tr>
  <tr> 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利91精品| 日韩国产精品大片| 风间由美一区二区av101| 日韩美一区二区三区| 欧美aⅴ一区二区三区视频| 91 com成人网| 美女尤物国产一区| 精品国产乱码久久久久久1区2区| 青娱乐精品视频在线| 欧美xxxx在线观看| 国产成人av电影免费在线观看| 中文字幕高清不卡| 91久久免费观看| 图片区小说区区亚洲影院| 日韩一区二区三区免费看| 国模冰冰炮一区二区| 国产精品久久久久久亚洲毛片| 99精品久久久久久| 日韩成人免费电影| 久久久不卡网国产精品二区| www.欧美日韩| 亚洲成av人片一区二区| 26uuu国产在线精品一区二区| 国产盗摄一区二区三区| 亚洲最大成人综合| 欧美tickling挠脚心丨vk| www.日韩av| 天天av天天翘天天综合网色鬼国产 | 天天做天天摸天天爽国产一区 | 国产一区二区h| 国产精品久久久久久久久免费相片 | 国产精品毛片大码女人| 日本道精品一区二区三区| 日本在线观看不卡视频| 欧美激情一区在线| 欧美日韩国产美| 高清不卡一二三区| 婷婷丁香激情综合| ...av二区三区久久精品| 69堂成人精品免费视频| jizz一区二区| 国模套图日韩精品一区二区| 一区二区高清在线| 精品国产91乱码一区二区三区| 国产成人精品1024| 香蕉成人伊视频在线观看| 中文字幕日韩av资源站| 欧美久久久久久久久中文字幕| 国产精品自产自拍| 亚洲图片欧美综合| 国产午夜精品一区二区三区嫩草 | 欧美日韩免费观看一区二区三区| 肉丝袜脚交视频一区二区| 国产视频一区在线播放| 欧美日韩激情一区二区| 国产福利不卡视频| 午夜精品久久久久久| 亚洲精品视频在线看| 久久奇米777| 3751色影院一区二区三区| 99久久伊人网影院| 免费高清成人在线| 亚洲欧洲中文日韩久久av乱码| 欧美一卡二卡三卡| 欧美性视频一区二区三区| 国产视频一区不卡| 日韩一级精品视频在线观看| 色哟哟一区二区在线观看| 豆国产96在线|亚洲| 免费一级欧美片在线观看| 亚洲区小说区图片区qvod| 久久综合久久综合久久综合| 欧美人妖巨大在线| caoporen国产精品视频| 九九精品视频在线看| 五月天欧美精品| 亚洲欧美一区二区三区国产精品 | 亚洲精品ww久久久久久p站| 精品乱码亚洲一区二区不卡| 欧美人伦禁忌dvd放荡欲情| 99久久久免费精品国产一区二区 | 日本一区二区免费在线| 欧美电视剧免费全集观看| 欧美日韩一区不卡| 在线视频欧美区| 99热99精品| 国产成人高清在线| 国产精品中文有码| 精品午夜久久福利影院| 麻豆91精品91久久久的内涵| 天天操天天综合网| 午夜电影一区二区| 天堂蜜桃一区二区三区| 亚洲国产一区二区三区| 亚洲一区二区欧美| 亚洲一二三区不卡| 免费成人在线观看| 免费看欧美女人艹b| 日韩精品色哟哟| 亚洲图片自拍偷拍| 亚洲综合在线观看视频| 亚洲一区二区三区视频在线| 亚洲国产成人va在线观看天堂| 亚洲欧美色一区| 亚洲午夜日本在线观看| 一区二区在线看| 日日夜夜精品视频天天综合网| 丝袜亚洲另类欧美| 久久精品国产99国产| 国模娜娜一区二区三区| 丁香一区二区三区| 91在线云播放| 欧美视频一区二区三区| 亚洲精品国久久99热| 一区二区三区四区在线播放| 亚洲尤物在线视频观看| 久久成人精品无人区| 91免费国产在线观看| 欧美午夜片在线看| 国产日产精品一区| 亚洲天堂2014| 久草热8精品视频在线观看| 国产麻豆一精品一av一免费| 成人av午夜影院| 在线观看精品一区| 日韩欧美一卡二卡| 国产精品全国免费观看高清 | 91小视频在线观看| 欧洲视频一区二区| 欧美一区二区成人6969| 国产欧美一区二区三区沐欲| 亚洲精品免费一二三区| 三级不卡在线观看| 成人午夜免费电影| 在线电影国产精品| 在线观看国产一区二区| 久久新电视剧免费观看| 国产精品国产三级国产a| 亚洲一二三四区不卡| 久久精品国产免费| 中文字幕精品在线不卡| 亚洲一区二区五区| 国产一区欧美一区| 在线视频观看一区| 欧美国产1区2区| 免费一级欧美片在线观看| 成人精品免费看| 欧美图片一区二区三区| 国产蜜臀97一区二区三区| 五月天丁香久久| 成人av动漫网站| 日韩亚洲欧美中文三级| 一区二区三区欧美在线观看| 久久精品国产精品亚洲综合| 91高清视频免费看| 日韩精品一区二区三区蜜臀| 亚洲综合久久久| 波多野结衣中文字幕一区| 日韩欧美不卡在线观看视频| 夜夜精品浪潮av一区二区三区| 国产精品538一区二区在线| 91精品国产免费| 亚洲最快最全在线视频| 99久久久精品| 国产精品视频看| 青青草视频一区| 欧美乱妇20p| 亚洲成人一二三| 一本大道av伊人久久综合| 国产亚洲欧美一级| 激情图区综合网| 亚洲精品一区二区三区精华液 | 亚洲精品国产成人久久av盗摄| 国产黄色91视频| 欧美精品一区二区蜜臀亚洲| 日日摸夜夜添夜夜添精品视频| 欧美综合久久久| 亚洲人成在线观看一区二区| 成人看片黄a免费看在线| 国产清纯白嫩初高生在线观看91| 精品一区精品二区高清| 欧美剧在线免费观看网站| 日韩在线一区二区三区| 欧美亚洲综合久久| 亚洲一区二区三区中文字幕在线| 91麻豆高清视频| 亚洲另类中文字| 91视频.com| 一级中文字幕一区二区| 一本色道a无线码一区v| 亚洲影视在线播放| 在线观看国产精品网站| 亚洲品质自拍视频| 色狠狠色狠狠综合| 国产精品久久精品日日| 色综合天天做天天爱| 夜夜嗨av一区二区三区| 欧美日韩国产小视频| 男人的j进女人的j一区| 久久婷婷久久一区二区三区|