View Issue Details

IDProjectCategoryView StatusLast Update
0021643FPCDocumentationpublic2012-08-03 12:37
ReporterReinier OlislagersAssigned ToMichael Van Canneyt  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Platformx64OSWindows 
Product Version2.7.1 
Target Version2.6.1Fixed in Version3.0.0 
Summary0021643: mssqlconn (Sybase/SQL Server) connector documentation
DescriptionAttached documentation for the Sybase ASE/MS SQL Server connector.
The documentation only describes the differences with its parent class, which are fairly limited.
Steps To ReproducePut mssqlconn.xml into fpcdocs repository.
Additional InformationFPC trunk currently won't allow building documents (bug 21621) so no couldn't test integration into FCL.
At least xmllint, Notepad++ (in earlier versions) didn't complain.
Edited and saved final version with Lazarus Documentation Editor, and the XML validates as per http://xmlvalidation.com, so I assume it must be correct.

Background discussion on contents of
TagsNo tags attached.
Fixed in Revision903
FPCOldBugId
FPCTarget
Attached Files

Activities

2012-04-04 08:21

 

mssqlconn.xml (6,828 bytes)   
<?xml version="1.0" encoding="utf-8"?>
<fpdoc-descriptions>
  <package name="fcl-db">
    <!--
  ====================================================================
    mssqlconn
  ====================================================================
-->
    <module name="mssqlconn">
      <short>Microsoft SQL Server and Sybase ASE database connectors</short>
      <descr>Connector to Microsoft SQL Server databases. Needs FreeTDS dblib library.
</descr>
      <!--
  ********************************************************************
    #fcl-db.mssqlconn.TMSSQLConnection
  ********************************************************************
-->
      <!-- class Visibility: default -->
      <element name="TMSSQLConnection">
        <short>Microsoft SQL Server database connector</short>
        <descr>
          <p>Connector to Microsoft SQL Server databases.</p>
          <p>Requirements:</p>
          <p>MS SQL Server Client Library is required (ntwdblib.dll)</p>
          <p>- or -</p>
          <p>FreeTDS (dblib.dll)</p>
          <p>Older FreeTDS libraries may require freetds.conf: (http://www.freetds.org/userguide/freetdsconf.htm)</p>
          <p>[global]</p>
          <p>tds version = 7.1</p>
          <p>client charset = UTF-8</p>
          <p>port = 1433 or instance = ...  (optional)</p>
          <p>dump file = freetds.log        (optional)</p>
          <p>text size = 2147483647         (optional)</p>
          <p>Known problems:</p>
          <p>- CHAR/VARCHAR data truncated to column length when encoding to UTF-8 (use NCHAR/NVARCHAR instead or CAST char/varchar to nchar/nvarchar)</p>
          <p>- Multiple result sets (MARS) are not supported (for example when SP returns more than 1 result set only 1st is processed)</p>
          <p>- DB-Library error 10038 "Results Pending": set TSQLQuery.PacketRecords=-1 to fetch all pending rows</p>
          <p>- BLOB data (IMAGE/TEXT columns) larger than 16MB are truncated to 16MB: (set TMSSQLConnection.Params: 'TEXTSIZE=2147483647' or execute 'SET TEXTSIZE 2147483647')</p>
        </descr>
        <errors/>
        <seealso/>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.Password">
        <descr>
          <var>TMSSQLConnection</var> specific: if you don't enter a UserName and Password, the connector will try to use Trusted Authentication/SSPI (on Windows only).</descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.UserName">
        <descr>
          <var>TMSSQLConnection</var> specific: if you don't enter a UserName and Password, the connector will try to use Trusted Authentication/SSPI (on Windows only).</descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.CharSet">
        <descr>
          <p>Character Set - if you use Microsoft DB-Lib and set to 'UTF-8' then char/varchar fields will be UTF8Encoded/Decoded.</p>
          <p>If you use FreeTDS DB-Lib, then you must compile with iconv support (requires libiconv2.dll) or cast char/varchar to nchar/nvarchar in SELECTs.</p>
        </descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.HostName">
        <short>Host and optionally port or instance</short>
        <descr>
          <p>
            <var>TMSSQLConnection</var> specific: you can specify an instance or a port after the host name itself.</p>
          <p>Instance should be specified with a backslash e.g.: 127.0.0.0.1\SQLEXPRESS. Port should be specified with a colon, e.g. BIGBADSERVER:1433</p>
          <p>See <url href="http://www.freetds.org/userguide/portoverride.htm"/>
          </p>
        </descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.DatabaseName">
        <descr>
          <var>TMSSQLConnection</var> specific: the 
          <var>master</var> database should always exist on a server.</descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TMSSQLConnection.Params">
        <descr>
          <p>
            <var>TMSSQLConnection</var> specific:</p>
          <p>set "AutoCommit=true" if you don't want to explicitly commit/rollback transactions</p>
          <p>set "TextSize=16777216 - to set maximum size of blob/text/image data returned. Otherwise, these large fields may be cut off when retrieving/setting data.</p>
        </descr>
      </element>
      <!--
  ********************************************************************
    #fcl-db.mssqlconn.TSybaseConnection
  ********************************************************************
-->
      <!-- class Visibility: default -->
      <element name="TSybaseConnection">
        <short>Sybase ASE database connector</short>
        <descr>
          <p>Connector to Sybase Adaptive Server Enterprise (ASE) database servers.</p>
          <p>Requirements:</p>
          <p>FreeTDS (dblib.dll)</p>
          <p>Older FreeTDS libraries may require freetds.conf: (http://www.freetds.org/userguide/freetdsconf.htm)</p>
          <p>[global]</p>
          <p>tds version = 7.1</p>
          <p>client charset = UTF-8</p>
          <p>port = 5000  (optional)</p>
          <p>dump file = freetds.log        (optional)</p>
          <p>text size = 2147483647         (optional)</p>
        </descr>
      </element>
      <!-- property Visibility: published -->
      <element name="TSybaseConnection.HostName">
        <short>Host and optionally port</short>
        <descr>
          <p>
            <var>TSybaseConnection</var> specific: you can specify a port after the host name itself.</p>
          <p>Port should be specified with a colon, e.g. BIGBADSERVER:5000</p>
          <p>See <url href="http://www.freetds.org/userguide/portoverride.htm"/>
          </p>
        </descr>
      </element>
      <!--
  ********************************************************************
    #fcl-db.mssqlconn.EMSSQLDatabaseError
  ********************************************************************
-->
      <!-- class Visibility: default -->
      <element name="EMSSQLDatabaseError">
        <short>Sybase/MS SQL Server specific error</short>
        <descr/>
        <errors/>
        <seealso/>
      </element>
      <!-- variable Visibility: public -->
      <element name="EMSSQLDatabaseError.DBErrorCode">
        <short>Sybase/MS SQL Server error code</short>
        <descr>Error code as generated by the database server.
</descr>
        <seealso/>
      </element>
    </module>
    <!-- mssqlconn -->
  </package>
  <!-- fcl-db -->
</fpdoc-descriptions>
mssqlconn.xml (6,828 bytes)   

Reinier Olislagers

2012-04-04 09:36

developer   ~0058282

Last edited: 2012-04-04 10:32

NB: used package name fcl-db; could of course be changed to fcl...

Ran trunk fpdoc to try and see if it spits out errors.
cd /d D:\Reinier\Documents\SourceCode\fpc_laz_patch_playground\
Ran this batch file:
@echo off
set FPCSRCDIR=c:\development\fpctrunk
C:\Development\fpctrunk\utils\fpdoc\fpdoc.exe --package=fcl-db --input=C:\Development\fpctrunk\packages\fcl-db\src\sqldb\mssql\mssqlconn.pp --descr=D:\Reinier\Documents\SourceCode\fpc_laz_patch_playground\docs\mssqlconn.xml --format=chm --output=mssqlconn.chm --verbose
set FPCSRCDIR=

... gave no warnings:
D:\Reinier\Documents\SourceCode\fpc_laz_patch_playground\docs>doc
FPDoc - Free Pascal Documentation Tool
Version 2.7.1 [2012/04/04]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org

Opening source file "C:\Development\fpctrunk\packages\fcl-db\src\sqldb\mssql\mss
qlconn.pp".
Writing documentation
Writing 90 pages...
HTML Files written. Collecting other files and compressing...this could take som
e time
Finishing compressing...
Done.

...generated .chm file that seemed ok.

Michael Van Canneyt

2012-04-14 17:08

administrator   ~0058593

Applied, thank you very much !

Issue History

Date Modified Username Field Change
2012-04-04 08:21 Reinier Olislagers New Issue
2012-04-04 08:21 Reinier Olislagers Status new => assigned
2012-04-04 08:21 Reinier Olislagers Assigned To => Michael Van Canneyt
2012-04-04 08:21 Reinier Olislagers File Added: mssqlconn.xml
2012-04-04 09:36 Reinier Olislagers Note Added: 0058282
2012-04-04 09:39 Reinier Olislagers Note Edited: 0058282
2012-04-04 09:40 Reinier Olislagers Note Edited: 0058282
2012-04-04 09:41 Reinier Olislagers Note Edited: 0058282
2012-04-04 10:32 Reinier Olislagers Note Edited: 0058282
2012-04-14 17:08 Michael Van Canneyt Fixed in Revision => 903
2012-04-14 17:08 Michael Van Canneyt Status assigned => resolved
2012-04-14 17:08 Michael Van Canneyt Fixed in Version => 2.7.1
2012-04-14 17:08 Michael Van Canneyt Resolution open => fixed
2012-04-14 17:08 Michael Van Canneyt Note Added: 0058593
2012-04-14 17:08 Michael Van Canneyt Target Version => 2.6.1
2012-08-03 12:37 Reinier Olislagers Status resolved => closed