The name of the initialization file for ODBC connections is PKODB25.INI.
When you access data through the ODBC interface, PocketBuilder uses the PKODB25 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.
In most cases, you do not need to modify the PKODB25 initialization file. Change the PKODB25 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 PKODB25 initialization file if you need to add functions for your back-end DBMS.
If you modify the PKODB25 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 PKODB25 initialization file, tell the representative that you changed the file and describe the changes you made.
The PKODB25 initialization file lists the functions for SQL Anywhere. If you need to add a function to the PKODB25 initialization file for use with SQL Anywhere, add the function to the ASA_FUNCTIONS section.
To add functions to an existing section in the
PKODB25 initialization file:
Open the PKODB25 initialization file in one of the following ways:
Use the File editor in PocketBuilder. (For instructions, see the Users Guide.)
Use any text editor outside PocketBuilder.
Find the [ASA_FUNCTIONS] section near the end of the file:
[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(*)
To add a new function, type a comma followed by the function name at the end of the appropriate function list, as follows:
Aggregate functions – add aggregate functions to the end of the AggrFuncs list.
All other functions – add all other functions to the end of the Functions list.
Save your changes to the PKODB25 initialization file.