PB6.5连接sybase的问题

superboy06 2003-10-20 11:14:26
在PB6.5painter工作区内打开表时出现下面的问题,请指教
stored procedure 'sp_pb60table' not found.specify owner.objectname or user sp_help to chech whether the object exists(sp_help may produce lots of output!”

这是什么意思?
...全文
131 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
romeo 2003-10-23
  • 打赏
  • 举报
回复
我的这个文件名是sp_pb6070proc.sql,估计是帮我找到这个文件的哥么自己起的名字,你找找吧!
homeness 2003-10-21
  • 打赏
  • 举报
回复
我也出现同样的问题
zhuang_zm@tom.com
tinyghost 2003-10-21
  • 打赏
  • 举报
回复
如果没有的话,把信箱留下,
tinyghost 2003-10-21
  • 打赏
  • 举报
回复
pb6.5连接sybase时需要执行一个过程,(自己的产品连接还有限制,真不知道他们是怎么想的)
你可以找找, 这些存储过程一般在pb的安装盘上(好像
叫做pbsyb60.sql),看看有没有??
superboy06 2003-10-20
  • 打赏
  • 举报
回复
太多了吧?我怎么运行呀
romeo 2003-10-20
  • 打赏
  • 举报
回复
/*-------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60extcat checks the status of PB Catalog. */
/* Returns cExists[10] with Y/N values. */
/*-------------------------------------------------*/
create procedure sp_pb60extcat
as
declare @tbl char(1)
declare @col char(1)
declare @fmt char(1)
declare @vld char(1)
declare @edt char(1)
declare @tblproc char(1)
declare @colproc char(1)
declare @fmtproc char(1)
declare @vldproc char(1)
declare @edtproc char(1)
declare @existbuff char(10)
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcattbl'))
select @tbl = 'Y'
else
select @tbl = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatcol'))
select @col = 'Y'
else
select @col = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatfmt'))
select @fmt = 'Y'
else
select @fmt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatvld'))
select @vld = 'Y'
else
select @vld = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pbcatedt'))
select @edt = 'Y'
else
select @edt = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_cattbl'))
select @tblproc = 'Y'
else
select @tblproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catcol'))
select @colproc = 'Y'
else
select @colproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catfmt'))
select @fmtproc = 'Y'
else
select @fmtproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catvld'))
select @vldproc = 'Y'
else
select @vldproc = 'N'
if exists
(select id from dbo.sysobjects where
id = object_id('dbo.pb_catedt'))
select @edtproc = 'Y'
else
select @edtproc = 'N'
select @existbuff = @tbl + @col + @fmt + @vld + @edt +
@tblproc + @colproc + @fmtproc +
@vldproc + @edtproc
select @existbuff
go

SETUSER
go

grant Execute on sp_pb60extcat to public
go

print 'sp_pb60fktable'
SETUSER 'dbo'
go

/*--------------------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60fktable lists the tables that reference this table. */
/*--------------------------------------------------------------*/
create procedure sp_pb60fktable
@objname varchar(61) = null
as
declare @objid int
declare @isolevel int /* ptrack 325579 isolation level */

if (@objname is null)
return (1)

select @objid = object_id(@objname)
/* ptrack 325579 override isolation level 0 default */
select @isolevel = @@isolation
if @isolevel = 0
begin
set transaction isolation level 1
end

select o.name, o.id, o.type, o.uid, user_name(o.uid)
from dbo.sysobjects o, dbo.sysreferences r
where r.reftabid = @objid and
r.tableid = o.id

if @isolevel = 0
begin
set transaction isolation level 0
end
go

SETUSER
go

grant Execute on sp_pb60fktable to public
go

print 'sp_pb60foreignkey'
SETUSER 'dbo'
go
romeo 2003-10-20
  • 打赏
  • 举报
回复
print 'sp_pb60column'
SETUSER 'dbo'
go

/*------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60column lists the columns in a table. */
/* The objectid is required as arg1. */
/*------------------------------------------------*/
create proc sp_pb60column
@id int

as
declare @text varchar(255)
select @text = null
select c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, @text
from dbo.syscolumns c where c.id = @id and c.cdefault = 0
union select
c.colid, c.status, c.type, c.length, c.name, c.usertype,
c.prec, c.scale, m.text
from dbo.syscolumns c, dbo.syscomments m where c.id = @id
and c.cdefault = m.id and m.colid = 1
order by c.colid
go

SETUSER
go

grant Execute on sp_pb60column to public
go

print 'sp_pb60db'
SETUSER 'dbo'
go

/*-----------------------------------------------------*/
/* PowerBuilder Client Library Interface */
/* sp_pb60db retrieves the names of all databases */
/* available for this server. */
/*-----------------------------------------------------*/
create proc sp_pb60db as
select name from master.dbo.sysdatabases
go

SETUSER
go

grant Execute on sp_pb60db to public
go

print 'sp_pb60extcat'
SETUSER 'dbo'
go
romeo 2003-10-20
  • 打赏
  • 举报
回复
我以前也遇到过这个问题,这是pb6。5与sybase连接的一个bug,你只要用sqladv。exe这个小工具运行一下下面代码就行了。
qqjj7758 2003-10-20
  • 打赏
  • 举报
回复
一样的问题哦
superboy06 2003-10-20
  • 打赏
  • 举报
回复
是不是pbsyc.sql和pbsyc2.sql这两个文件?
这两个文件光盘上没有,可以下载吗?
superboy06 2003-10-20
  • 打赏
  • 举报
回复
直接你告诉我是哪个sql文件,我找找
romeo 2003-10-20
  • 打赏
  • 举报
回复
这还没贴完呢,刚才我连续发了3个帖子她就不让发了,我想删除其中一贴,可是没找到删除按扭,sign……这也太次了一点吧~~~~
其实这个代码是存成.sql文件,你用sqladv.exe可以打开它,不要看见代码多就认为执行速度慢,我执行这个代码就用了几分钟,很快的。
可是我现在没办法贴完整的代码,这个网站又不让上传文件,我也不知道该怎么半了
<通用查询><通用排序><数据备份><数据恢复>和<通用数据字典>的使用说明 安装步骤: 1.解开压缩文件 2.用PB打开free.pbl中的应用free 3.在free应用的搜索路径中包含 c:freefree.pbl; c:freecond.pbl; c:freesort.pbl; c:freeackup.pbl; c:freefzsr.pbl; 4.在PB下用free.db创建一个free数据库 5.run即可运行 调用方法: 1.调用<通用查询条件>方法: 把cond.pbl中的所有对象拷贝到你的应用中 把表report_condition用数据管道拷贝到你的数据库中 调用代码: openwithparm(w_condition_free,dw_1) 注意:如果你的事务对象不是sqlca,请修改w_condition_free中的sqlca为你自己的事务对象 2.调用<通用排序>方法 把sort.pbl中的所有对象拷贝到你的应用中 调用代码: openwithparm(w_sort_free,dw_1) 3.调用<数据备份>和<数据恢复>方法 把backup.pbl中的所有对象拷贝到你的应用中,另外要把rar.exe拷贝到当前目录 <数据备份>调用代码:open(w_backup) <数据恢复>调用代码:open(w_restor) 功能: (1)压缩备份和解压恢复,压缩率很高 (2)可选择不同的盘符,包括软盘,硬盘,MO,磁带,CD等 (3)对于软盘(A:盘)备份会自动分割1.44M (4)单机备份和恢复简单方便 (5)Sybase Adaptive Server Anywhere网络数据库可在工作站或服务器上进行数据备份 注意: (1)进度条不太匀速主要是因为要运行外部程序RAR,DBBACKUP,ATTRIB等 (2)在PB下运行时请不要先打开要备份的数据库,否则会出现不能关闭数据库的错误,如果运行exe则不会. (3)连接数据库设置放在ini文件中,同时把w_backup和w_restor中的 inifree.ini 改成你的ini文件 (4)网络数据库的数据备份要把serverdbbackup.exe拷贝到当前目录 (5)网络数据库的数据恢复必须在服务器上用单机的连接方式,即先关闭Sybase Adaptive Server连接,然后再用Sybase SQL Anywhere连接数据库 (6)一定要把rar.exe和attrib.exe拷贝到当前目录 4.调用<通用数据字典>的方法 (1)把w_zkl_fzsr拷贝到你的PBL中 (2)把report.db数据库中的fzsr表通过数据管道导入到你的数据库中 (3)在你的数据窗口的doublclicked事件中写上openwithparm(w_zkl_fzsr,this)即可实现这个功能 注意: (1)如果你的事务对象不是sqlca,请修改w_zkl_fzsr中的sqlca为你自己的事务对象 (2)如果数据字典的数据源不是存放在fzsr表中,而是存放在已有的表中, 如在输入"职员编码"字段时需要弹出职员资料表中的数据,那需要在w_zkl_fzsr的open事件中增加一些代码, 增加的代码可以看有关读取商品资料表的例子 该源代码的版权属于致用电脑工作室,需要转载的朋友请注明: 来源:PB通用强档:http://pbreport.126.com

1,072

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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