ODBC Tags
web_ODBCDrivers
web_ODBCDsns
web_DsnAttrs
web_ConfigDsn

ODBC Tags

webp_odbc.dll implements four ODBC datasource related custom tags.

1. Function: ListODBCDrivers
  It gives out all the odbc driver's names installed on the machine running web+ server. It actually returns a query result set with only one column name: DriverName.
  So, if you define your corresponding custom tag as:
    TagName4=ODBCDrivers
    DllPath4=d:\ztemp\webp_odbc.dll
    FuncName4=ListODBCDrivers

  You can use it in Web+ as:
        <web_ODBCDrivers Name="allDrivers" Error=#rt# ByRef>
          <webIf #!rt#>
            <webPrint Query="allDrivers">
              #DriverName#<BR>
            </webPrint>
          </weBIf>

  
2. Function: ListODBCDsns
  It gives out all the system datasource's names defined on the machine
  running Web+ server. It actually returns a query result set with only
  one column name: Driver.
  So if you define your corresponding custom tag as:
    TagName5=ODBCDsns
    DllPath5=d:\ztemp\webp_odbc.dll
    FuncName5=ListODBCDsns

  You can use it in Web+ as:
    <web_ODBCDsns Name="allDsns" Error=#rt# ByRef>
    <webIf #!rt#>
        <webPrint Query="allDsns">
          #Driver#<BR>
      </webPrint>
    </webIf>

3. Function: DsnAttributes
  It gives out a particular system datasource's attributes defined in the registry file. Different kind of datasource will have different set of attributes. So the actual query set it returns depends on the type of the datasource.

Datasource Result set includes columns of:
Access Driver, Description, DBDirectory,  SystemDatabasePath, Exclusive, ReadOnly, DefaultLoginName, DefaultLoginPassword, BufferSize, PageTimeout.
SQL-Server Driver, Description, Server, UseTrustedConnect, LoginDatabase, LoginLanguage, LoginGenStorProc, ConvertOEMtoANSI
MS-Foxpro Driver, Description, DBDirectory, Version, DriverId, CollatingSequence, PageTimeout.
Visual Foxpro Driver, Description, DBDirectory, DBType, CollatingSequence, Exclusive, FetchDataInBckrnd.
MS-Excel Driver, Description, DBDirectory, Version, DriverId, RowsToScan.
MS-DBase Driver, Description, DBDirectory, Version, DriverId, CollatingSequence, PageTimeout.
MS-Text Driver, Description, DBDirectory, ExtensionsList.
MS-Paradox Driver, Description, DBDirectory, Version, DriverId, CollatingSequence, PageTimeout, UserName, NetStyle, NetworkDirectory.
MS-Oracle Driver, Description, UserName, ConnectString, BufferSize, RowLimit, SynonymColumns, Remarks, Systemtable.

So if you define your corresponding custom tag as:
    TagName6=DsnAttrs
    DllPath6=d:\ztemp\webp_odbc.dll
    FuncName6=DsnAttributes

  You can use it in web+ as:
    <web_DsnAttrs Name="dsnAttrs" Dsn="MyODBCTest" Error=#rt# ByRef>
    <webIf #!rt#>
     <webPrint Query="dsnAttrs">
      #Driver#<BR>
      #Description#<BR>
     </webPrint>
     <webSelectCase #Driver#>
       <webCase "Microsoft Access Driver (*.mdb)">
       ....
     </webSelectCase>
    </webIf>

4. Function: ConfigDsn
  It is used to create, update, or delete a datasource.
  So if you define your corresponding custom tag as:
    TagName7=ConfigDsn
    DllPath7=d:\ztemp\webp_odbc.dll
    FuncName7=ConfigDsn


  You can use it in web+ as:
  <web_ConfigDsn Dsn=#DSN# Driver=#DSNDriverName# Action=#dsnOperation#
Attributes=#Attrs#>

Where #DSN# is the name of the datasource you want to create, update, or delete #DSNDriverName# is the driver's name like "Microsoft Access Driver (*.mdb)". #dsnOperation# can be "Add", "Update", "Remove" webp_dir.dll implements the custom tag which list all the disk driver's names, or list all the subdirectories, files under a particular directory.

So if you definee the corresponding custom tag as:
    TagName9=ListDir
    DllPath9=d:\ztemp\webp_dir.dll
    FuncName9=ListDir
 
  You can use it in web+ as:
    <web_ListDir Name="List" Dir="C:\" Pattern="*.cpp">
    <webPrint Query="List">
    #FileOrDir#<BR>
    </webPrint>

 

Copyright © 2009 Webplus, Inc. (talentsoft). All Rights Reserved.
webmaster@webplus.com