The PKODB20 initialization file

The name of the PKODB20 initialization file is PKODB20.INI.

Function of the PKODB20 initialization file

When you access data through the ODBC interface, PocketBuilder uses the PKODB20 initialization file to maintain access to extended functionality in the back-end DBMS, for which ODBC does not provide an API call. Examples of extended functionality are SQL syntax or function calls specific to a particular DBMS.

Editing the PKODB20 initialization file

In most cases, you do not need to modify the PKODB20 initialization file. Change the PKODB20 initialization file only if you are asked to do so by a Technical Support representative. Changes to this file can adversely affect PocketBuilder.

However, you can edit the PKODB20 initialization file if you need to add functions for your back-end DBMS.

If you modify the PKODB20 initialization file, first make a copy of the existing file, then keep a record of all changes you make. If you call Technical Support after modifying the PKODB20 initialization file, tell the representative that you changed the file and describe the changes you made.

Adding functions to the PKODB20 initialization file

The PKODB20 initialization file lists the functions for SQL Anywhere. If you need to add a function to the PKODB20 initialization file for use with SQL Anywhere, add the function to the ASA_FUNCTIONS section.

StepsTo add functions to an existing section in the PKODB20 initialization file:

  1. Open the PKODB20 initialization file in one of the following ways:

  2. Find the Functions section for SQL Anywhere (ASA_FUNCTIONS):

    ;*********************************************
    
    ;Functions
    
    ;*********************************************
    
    [ASA_FUNCTIONS]
    
    AggrFuncs=avg(x),avg(distinct x),count(x),
    
        count(distinct x),count(*),list(x),
    
        list(distinct x),max(x),max(distinct x),
    
        min(x),min(distinct x),sum(x),sum(distinct x)
    
    Functions=abs(x),acos(x),asin(x),atan(x),
    
        atan2(x,y),ceiling(x),cos(x),cot(x),degrees(x),
    
        exp(x),floor(x),log(x),log10(x),
    
        mod(dividend,divisor),pi(*),power(x,y),
    
        radians(x),rand(),rand(x),
    
        remainder(dividend,divisor),round(x,y),
    
        sign(x),sin(x),sqrt(x),tan(x),
    
        "truncate"(x,y),ascii(x),byte_length(x),
    
        byte_substr(x,y,z),char(x),char_length(x),
    
        charindex(x,y),difference(x,y)insertstr(x,y,z),
    
        lcase(x),left(x,y),length(x), locate(x,y,z),
    
        lower(x),ltrim(x),patindex('x',y),repeat(x,y),
    
        replicate(x,y),right(x,y),rtrim(x),
    
        similar(x,y),soundex(x),space(x),str(x,y,z),
    
        string(x,...),stuff(w,x,y,z),substr(x,y,z),
    
        trim(x),ucase(x),upper(x),date(x),
    
        dateformat(x,y),datename(x,y),day(x),
    
        dayname(x),days(x),dow(x),hour(x),hours(x),
    
        minute(x),minutes(x),minutes(x,y),month(x),
    
        monthname(x),months(x),months(x,y),now(*),
    
        quarter(x),second(x),seconds(x),seconds(x,y),
    
        today(*),weeks(x),weeks(x,y),year(x),years(x),
    
        years(x,y),ymd(x,y,z),dateadd(x,y,z),
    
        datediff(x,y,z),datename(x,y),datepart(x,y),
    
        getdate(),cast(x as y),convert(x,y,z),
    
        hextoint(x),inttohex(x),
    
        connection_property(x,...),datalength(x),
    
        db_id(x),db_name(x),db_property(x),
    
        next_connection(x),next_database(x),
    
        property(x),property_name(x),
    
        property_number(x),property_description(x),
    
        argn(x,y,...),coalesce(x,...),
    
        estimate(x,y,z),estimate_source(x,y,z),
    
        experience_estimate(x,y,z),ifnull(x,y,z),
    
        index_estimate(x,y,z),isnull(x,...),
    
        number(*),plan(x),traceback(*)
    
  3. To add a new function, type a comma followed by the function name at the end of the appropriate function list, as follows:

    NoteCase sensitivity If the back-end DBMS you are using is case sensitive, be sure to use the required case when you add the function name.

  4. Save your changes to the PKODB20 initialization file.