精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● Powerbuilder>>数据库相关技术>>使SQL Anywhere不出现双引号等技巧

主题:使SQL Anywhere不出现双引号等技巧
发信人: ilike()
整理人: leitiger(2002-06-05 23:45:28), 站内信件
使用SQL Anywhere编程的时候,系统自动生成的select语句在字段两边会自动加
上双引号,看起来非常不爽。并且移植到其他系统,例如sybase,sql7时这些语句
往往会出错。
下面是使用SQL Anywhere不出现双引号的技巧:
打开progra~1\sybase\shared\PBODB60.INI,找到:
[Sybase SQL Anywhere]
DelimitIdentifier='YES'

改为DelimitIdentifier='NO'
好了,在PB中编程时不会将字段用双引号括起来了。

SQL Anywhere中有些函数提供了,但是在编程中引用PB却认为非法,例如,非常
有用的convert函数,我们也可以为它加上:》
在PBODB60.INI中,找到:
[WATCOM_FUNCTIONS]
Functions=length(),similar(),soundex(),substr(),string(),date(),datefo
rmat(),datetime(),day(),days(),dow(),hour(),hours(),minute(),minutes()
,second(),seconds(),month(),months(),now(*),today(*),weeks(),year(),ye
ars(),ymd(),abs(),ifnull(),isnull(),number(*),remainder(),mod()
改为:
Functions=length(),similar(),soundex(),substr(),string(),date(),datefo
rmat(),datetime(),day(),days(),dow(),hour(),hours(),minute(),minutes()
,second(),seconds(),month(),months(),now(*),today(*),weeks(),year(),ye
ars(),ymd(),abs(),ifnull(),isnull(),number(*),remainder(),mod(),conver
t()

这样子就可以在PB中使用convert这个函数了。

PBODB60.INI还可以修改很多东西,它的所有改法以及可以实现的功能全部在
PBODB60.INI这个文件的最后有详细的注释。

--
※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.103.137.78]

[关闭][返回]