在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!”
这是什么意思?
...全文
13412打赏收藏
PB6.5连接sybase的问题
在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!” 这是什么意思?
/*-------------------------------------------------*/
/* 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
/*------------------------------------------------*/
/* 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