home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / sqlsrv.cab / sqlsrdme.txt < prev    next >
Text File  |  1997-08-04  |  12KB  |  259 lines

  1. ****************************************************************
  2.                       MICROSOFT SQL SERVER
  3.                 MICROSOFT SQL SERVER ODBC DRIVER
  4.                     SETUP README, VERSION 3.5
  5. ****************************************************************
  6.  
  7. This file describes using the version 3.5 Microsoft SQL Server
  8. ODBC driver with version 6.5 or earlier Microsoft SQL Servers.
  9.  
  10. The topics covered are:
  11.  
  12. 1. Overview.
  13. 2. Installing Instcat.sql on the server.
  14. 3. Obtaining the SQL Server Client Net-Libraries.
  15. 4. Documentation sources regarding using ODBC with SQL Server.
  16. 5. Using the driver in a development environment.
  17. 6. Compatability issues.
  18.  
  19. ****************************************************************
  20. 1. Overview.
  21.  
  22. The version 3.5 Microsoft SQL Server ODBC driver is a Win32
  23. ODBC version 3.X driver.  It can be used with applications
  24. written to either the ODBC 2.X or ODBC 3.X APIs.  The driver
  25. works with Microsoft SQL Server version 4.21a or later.  The
  26. driver runs on  either Windows 95 or Windows NT (version 4.0
  27. or later).
  28.  
  29. A new version of the Win32 SQL Server Client Configuration
  30. utility is also installed with the version 3.5 SQL Server ODBC
  31. driver.  This SQL Server Client Configuration utility can be
  32. used with Microsoft SQL Server version 4.21a or later and the
  33. Client Net-Libraries that come with those versions of SQL
  34. Server.
  35.  
  36. ****************************************************************
  37. 2. Installing Instcat.sql on the server.
  38.  
  39. The SQL Server ODBC driver uses a set of system stored
  40. procedures, known as catalog stored procedures, to obtain
  41. information from the SQL Server system catalog.  Each version
  42. of the Microsoft SQL Server ODBC driver is developed to work
  43. with a specific version of the catalog stored procedures.  The
  44. Instcat.sql file included with the version 3.5 SQL Server ODBC
  45. driver includes minor updates to the catalog stored procedures
  46. that upgrade the procedures to the versions used by this
  47. driver.  The SQL Server system administrator must use the
  48. Instcat.sql script to upgrade the catalog stored procedures
  49. to ensure the proper operation of the driver.  Upgrading the
  50. catalog stored procedures does not affect the operation of
  51. older SQL Server clients.  This must be done for all
  52. versions of Microsoft SQL Server from 4.21a to 6.5.
  53.  
  54. To upgrade the catalog stored procedures, the system
  55. administrator runs a script using the isql utility (see the
  56. instructions below).  Before making any changes to the master
  57. database, the system administrator should back it up.  To run
  58. isql, your computer must be installed as a client workstation
  59. for Microsoft SQL Server.
  60.  
  61. At a command prompt, use the isql utility to run the Instcat.sql
  62. script.  For example:
  63.  
  64. C:> ISQL /Usa /Psa_password /Sserver_name /ilocation\Instcat.Sql
  65.  
  66. where
  67. sa_password 
  68.     Is the system administrator's password.
  69. server_name 
  70.     Is the name of the server on which SQL Server resides.
  71. location 
  72.     Is the full path of the location of Instcat.Sql.
  73.  
  74. The Instcat.sql script generates many messages.  Most of these
  75. indicate how many rows were affected by the Transact-SQL
  76. statements issued by the script.  Most of these messages can be
  77. ignored, although the output should be scanned for messages that
  78. indicate an execution error.  When Instcat.sql is run against a
  79. version 6.0 SQL Server, the message that says the object
  80. sp_MS_upd_sysobj_category does not exist can be ignored.  The
  81. last message should indicate that Instcat.sql completed
  82. successfully.  The Instcat.sql script fails when there is not
  83. enough space available in the master database to store the
  84. catalog stored procedures or to log the changes to existing
  85. procedures.
  86.  
  87. ****************************************************************
  88. 3. Obtaining the SQL Server Client Net-Libraries.
  89.  
  90. The Microsoft SQL Server ODBC driver uses the Microsoft SQL
  91. Server Client Net-Libraries to communicate with the server.
  92. The version 3.5 SQL Server ODBC driver also uses the SQL Server
  93. Client Configuration utility to manage the Net-Library
  94. associated with an ODBC data source.
  95.  
  96. The version 3.5 SQL Server ODBC driver installs only one
  97. Net-Library, the Win32 named pipe Net-Library Dbnmpntw.dll.
  98.  
  99. You can use the version 3.5 SQL Server ODBC driver with older
  100. Win32 Net-Libraries.  If a Net-Library other than the named pipe
  101. Net-Library is needed to connect to SQL Server, you can use
  102. the Net-Library that came with your version of Microsoft SQL
  103. Server.  You can get the SQL Server Net-Libraries by installing
  104. the Win32 SQL Server Client utilities for your version of
  105. Microsoft SQL Server.
  106.  
  107. The version of the SQL Server Client Configuration utility
  108. installed with the version 3.5 SQL Server ODBC driver can be
  109. used with the Client Net-Libraries from SQL Server 4.21a or
  110. later.
  111.  
  112. ****************************************************************
  113. 4. Documentation sources regarding using ODBC with SQL Server.
  114.  
  115. The version 3.5 Microsoft SQL Server ODBC driver complies with
  116. existing SQL Server 6.5 documentation for driver-specific
  117. information.  For documentation of driver-specific features, 
  118. see SQL Server manuals and Books Online.
  119.  
  120. The version 3.5 Microsoft SQL Server ODBC driver also complies
  121. with additional driver-specific information in the technical
  122. note "Using ODBC with Microsoft SQL Server," which is available
  123. on the Microsoft Web site at:
  124.  
  125. http://www.microsoft.com/sql/reskit.htm
  126.  
  127. The Sqlsodbc.hlp file that ships with the version 3.5 SQL Server
  128. ODBC driver contains only context sensitive help for the
  129. SQL Server ODBC Data Source wizard.  The Drvssrvr.hlp file that
  130. shipped with earlier versions of the Microsoft SQL Server ODBC
  131. driver contained driver-specific information for older versions 
  132. of the driver.  The information contained in the older versions 
  133. of Drvssrvr.hlp is duplicated in the SQL Server 6.5 manual 
  134. "Programming ODBC for Microsoft SQL Server."
  135.  
  136. ****************************************************************
  137. 5. Using the driver in a development environment.
  138.  
  139. The Microsoft SQL Server ODBC driver uses driver-specific
  140. parameters for several ODBC function calls.  #defines for these
  141. driver-specific parameters and driver-specific C and C++
  142. programming structures are contained in the include file
  143. Odbcss.h.
  144.  
  145. The version 3.5 SQL Server ODBC driver works with the
  146. Odbss.h file provided in the following sources:
  147.  
  148. SQL Server Service Pack 2 (SP2).
  149.     The service pack can be downloaded from the Microsoft
  150.     Web site at http://www.microsoft.com/sql/ServicePak.htm.
  151.  
  152. ODBC 3.0 SDK.
  153.     The ODBC 3.0 SDK is part of the Microsoft Developer
  154.     Network Professional edition.  The SDK can also be
  155.     downloaded from the Microsoft Web site at
  156.     http://www.microsoft.com/odbc.  The SDK is also
  157.     available from Microsoft Press in the "Microsoft ODBC
  158.     3.0 Software Development Kit and Programmer's
  159.     Reference."
  160.  
  161. ****************************************************************
  162. 6. Compatability issues.
  163.  
  164. The version 3.5 SQL Server ODBC driver displays a new wizard
  165. when adding or configuring data sources in either the ODBC
  166. Administrator utility or when an application calls
  167. SQLConfigDataSource and asks the driver to prompt the user for
  168. information.  Click the Help button in the wizard to access the
  169. wizard documentation.
  170.  
  171. In the version 2.65 SQL Server ODBC driver that shipped with
  172. SQL Server 6.5, the SQL_COPT_SS_PERF_QUERY_INTERVAL
  173. worked in seconds instead of the milliseconds it was documented
  174. to use (see Knowledge Base article Q157753).  In the version 3.5
  175. SQL Server ODBC driver, SQL_COPT_SS_PERF_QUERY_INTERVAL has 
  176. been changed to work in milliseconds as documented.
  177.  
  178. The following changes affect only applications written using
  179. the ODBC 3.X API.  They do not affect applications written
  180. using the ODBC 2.X API.  These changes should not impact
  181. the result set processing in most ODBC applications.
  182.  
  183. In prior versions of the SQL Server ODBC driver, contiguous
  184. PRINT or RAISERROR statements in a batch or stored procedure
  185. return their messages together, in one result set.  In the
  186. version 3.5 SQL Server ODBC driver, the messages for each
  187. SQL statement are returned as separate result sets.  You must
  188. call SQLMoreResults in between each message to be positioned
  189. on the message for the next SQL statement.  The messages from
  190. a single SQL statement, such as a DBCC statement, are all
  191. returned in a single result set and there is no need to call
  192. SQLMoreResults in between each message.
  193.  
  194. In prior versions of the SQL Server ODBC driver, a run-time
  195. error or a RAISERROR with a severity of 11 or higher on the
  196. first statement in a batch or stored procedure always caused
  197. either SQLExecute, SQLExecDirect, or SQLParamData to return
  198. SQL_ERROR.  In the version 3.5 SQL Server ODBC driver,
  199. SQLExecute, SQLExecDirect, or SQLParamData return SQL_ERROR
  200. only if no other statements are executed after the first
  201. statement.  If any other statements are executed after the
  202. first, even a simple RETURN statement with no return value, then
  203. SQLExecute or SQLExecDirect return SQL_SUCCESS_WITH_INFO.  After
  204. processing the SQL_SUCCESS_WITH_INFO messages using 
  205. SQLGetDiagRec, call SQLMoreResults to be positioned on the 
  206. next result set.
  207.  
  208. When prior versions of the driver encountered an error on the
  209. first statement of a batch or stored procedure, the statement
  210. handle was available for use with another SQL statement after
  211. SQLExecute or SQLExecDirect returned SQL_ERROR.  When the 3.5
  212. driver returns SQL_SUCCESS_WITH_INFO, the statement is not free
  213. to process another SQL statement until SQLMoreResults returns
  214. SQL_NO_DATA or until all result sets following the RAISERROR 
  215. have been closed.  If no result set follows the error message,
  216. then SQLCloseCursor cannot be called; SQLFreeStmt(SQL_CLOSE)
  217. or SQLMoreResults must be called to free the statement handle
  218. to process another SQL statement:
  219.  
  220. CREATE PROCEDURE TestPrc @Parm1 as
  221. IF (@Parm1 IS NULL)
  222. BEGIN
  223.     RAISERROR ('Parm1 cannot be NULL', 11, 1)
  224.     RETURN
  225. END
  226. SELECT * FROM sysusers WHERE suid = @Parm1
  227. GO
  228.  
  229. Execute the following:
  230.  
  231. SQLExecDirect(hstmt, "{ call TestPrc (NULL) }", SQL_NTS);
  232.  
  233. When using an older version of the SQL Server ODBC driver, or
  234. if the application uses the ODBC 2.X API, then SQLExecDirect
  235. returns SQL_ERROR.  After SQLGetDiagRec returns SQL_NO_DATA or
  236. SQLError returns SQL_NO_DATA_FOUND, the statement handle is
  237. free to execute another SQL statement.
  238.  
  239. When using the version 3.5 SQL Server ODBC driver from an
  240. application written to the ODBC 3.X API, then SQLExecDirect
  241. returns SQL_SUCCESS_WITH_INFO.  After SQLGetDiagRec returns
  242. SQL_NO_DATA, the statement handle cannot be used to process
  243. another SQL statement until SQLMoreResults returns
  244. SQL_NO_DATA or SQLFreeStmt(SQL_CLOSE) is called.
  245.  
  246. In prior versions of the SQL Server ODBC driver, SQLExecute,
  247. SQLExecDirect, or SQLParamData return SQL_SUCCESS when an
  248. application executes a searched UPDATE or DELETE statement
  249. that affects no rows.  For this case, the version 3.5 driver
  250. still returns SQL_SUCCESS to applications written with the
  251. ODBC 2.X API, but it returns SQL_NO_DATA to applications
  252. written with the ODBC 3.X API.  If either the ODBC 2.X
  253. application that receives SQL_SUCCESS or the ODBC 3.X
  254. application that receives SQL_NO_DATA then calls SQLRowCount,
  255. SQLRowCount returns a count of zero.
  256. ****************************************************************
  257.  
  258.  
  259.