ASA7中触发器问题!!!!!

am2000 2003-06-27 03:15:20
将SQL SERVER 2000数据库转换为ASA7时碰到如下问题.
SQLSTATE = S0002
[Sybase][ODBC Driver][Adaptive Server Anywhere]Table or view not found: Table 'new_project_plan' not found

No changes made to database.

INSERT INTO "project_plan" ( "projectcode", "plancode", "plandate", "filecode", "buildcontect", "budgefilecode", "budgemoney", "budgedate", "payoutflag", "fundsourcecode", "planmoney", "planbalance", "OperCode", "CheckFlag", "remark", "unitcode" ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )

--触发器源码

alter trigger DBA.plan_insert before insert order 1 on
DBA.project_plan
referencing new as new_project_plan
for each row
//[ WHEN( search_condition ) ]
//插入触发器:更新预算资金余额
begin
declare @budgemoney_inserted numeric(12,2);
declare @projectcode char(12);
declare @plancode char(8);
declare @planbalance numeric(12,2);
set @projectcode=(select projectcode from new_project_plan);
set @plancode=(select plancode from new_project_plan);
set @budgemoney_inserted=(select budgemoney from new_project_plan);
set @planbalance=(select planbalance from new_project_plan);
set @payoutflag=(select payoutflag from new_project_plan);
update project_plan set planbalance = IsNull(@planbalance,0.0)+@budgemoney_inserted where projectcode = @projectcode and plancode = @plancode
end

...全文
28 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
am2000 2003-07-01
  • 打赏
  • 举报
回复
SQLSTATE = 08001
[Sybase][ODBC Driver][Adaptive Server Anywhere]Unable to connect to database server: Authentication violation
am2000 2003-06-30
  • 打赏
  • 举报
回复
to tchatcha(老刀):请问哪里有ASA8下载的?另外,ASA7中怎么去掉查看数据时的那个双引号
am2000 2003-06-30
  • 打赏
  • 举报
回复
我基本解决了.
我是看到ASA支持两种语法,所以想直接从SQL SERVER转化为ASA.不是很成功。
fbc 2003-06-30
  • 打赏
  • 举报
回复
问题解决了。吗
提示的内容显示。你打开表或者视图没有建立。或者建立的有问题。
我可以问一个问题吗。
你用的是asa的网络数据库吗。
我想用pb8连接asa的网络版数据库,应该怎么做呢。
tchatcha 2003-06-30
  • 打赏
  • 举报
回复

set @projectcode=(select projectcode from new_project_plan);

这样语句改为
select @projectcode=(select projectcode from new_project_plan);


用pb8连接asa的网络版数据库,完全可以,用dbsrv8.exe启动服务

andyzq 2003-06-28
  • 打赏
  • 举报
回复
我对ASA也不熟悉,你去其他板块问问
jeff_107 2003-06-28
  • 打赏
  • 举报
回复
学习!
pbcoder 2003-06-27
  • 打赏
  • 举报
回复
不懂,只能帮你up了。
dotnba 2003-06-27
  • 打赏
  • 举报
回复
水兄的问题我只能UP了
我对ASA不熟悉
您上SQL版看看,那边数据库高手不少,比如大力
sinkiangscorpio 2003-06-27
  • 打赏
  • 举报
回复
declare @budgemoney_inserted numeric(12,2);
declare @projectcode char(12);
declare @plancode char(8);
declare @planbalance numeric(12,2);
在asa当中定义变量是这么写得吗,我也记不清楚了
am2000 2003-06-27
  • 打赏
  • 举报
回复
??我就是在ASA中进行编辑的啊.还要另外加入吗?
mengfan8868 2003-06-27
  • 打赏
  • 举报
回复
检测触发器是否已经加到ASA数据库中了

752

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧