为什么我在pb中连接数据库的时候,总出现catalog tables coulde not be created and are not available for use

datougui 2003-04-29 08:51:48
为什么我在pb中连接数据库的时候,总出现catalog tables coulde not be created and are not available for use 提示阿?
谁能告诉我啊!

...全文
863 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
novo 2003-05-02
  • 打赏
  • 举报
回复

This Powersoft repository tableStores information aboutThat includes

pbcatcolColumnsNames, comments, headers, labels, case, initial value, and justification

pbcatedtEdit stylesEdit style names and definitions

pbcatfmtDisplay formatsDisplay format names and definitions

pbcattblTablesName, owner, default fonts (for data, headings and labels), and comments

pbcatvldValidation rulesValidation rule names and definitions

Prefixes in repository table namesFor some databases, PowerBuilder precedes the name of the repository table with a default DBMS-specific prefix. For example, the names of Powersoft repository tables have the prefix DBO in a SQL Server database (such as DBO.pbcatcol), SYSTEM in an ORACLE database (such as SYSTEM.pbcatfmt), and PBCATOWN in a DB2 database (such as PBCATOWN.pbcattbl).The preceding table gives the base name of each repository table without the DBMS-specific prefix.



Controlling repository access

To control access to the Powersoft repository at your site, you can specify that PowerBuilder not create the repository, that the existing repository should not be updated, or that the repository is accessible only to certain users or groups.

You can control repository access by doing any of the following:

|Setting Use Powersoft Repository Set the Use Powersoft Repository database preference in the Database Preferences property sheet in the Database painter.

|Setting Read Only Set the Read Only database preference in the Database Preferences property sheet in the Database painter.

|Granting permissions on repository tables Grant explicit permissions on the repository tables to users or groups at your site.



Setting Use Powersoft Repository or Read Only to control access



vTo control repository access by setting Use Powersoft Repository or Read Only:1In the Database painter, click the Database Preferences button in the PainterBar. orSelect Design>Options from the menu bar.

Database Preferences buttonIf your PainterBar does not include the Database Preferences button, use the customize feature to add the button to the PainterBar.FOR INFO For instructions on customizing toolbars, see the PowerBuilder User's Guide .

The Database Preferences property sheet displays. If necessary, click the General tab to display the General property page.

2Set values for Use Powersoft Repository or Read Only as follows:



PreferenceWhat you doEffect

Use Powersoft RepositoryClear the checkboxDoes not create the Powersoft repository tables if they do not exist. Instead, the DataWindow and Report painters use the appropriate default values for extended attributes (such as headers, labels, and text color)If the Powersoft repository tables already exist, PowerBuilder does not use them when you create a new DataWindow or report

Read OnlySelect the checkboxIf the Powersoft repository tables already exist, PowerBuilder uses them when you create a new DataWindow or report , but does not update themTherefore, you cannot modify (update) information in the repository tables or any other database tables in the DataWindow and Report painters when the Read Only checkbox is selected3Do one of the following:

lClick Apply to apply the preference settings to the current connection and all future connections without closing the Database Preferences property sheet.

lClick OK to apply the preference settings to the current connection and all future connections and close the Database Preferences property sheet.PowerBuilder saves your preference settings in the [Database] section of the PowerBuilder initialization file.



Granting permissions on repository tables to control access

If your DBMS supports SQL GRANT and REVOKE statements, you can control access to the Powersoft repository tables. The default authorization for each repository table is:
GRANT SELECT, UPDATE, INSERT, DELETE ON table TO PUBLIC
After the repository tables are created, you can (for example) control access to them by granting SELECT authority to end users and SELECT, UPDATE, INSERT, and DELETE authority to developers.
This technique offers security and flexibility that is enforced by the DBMS itself
novo 2003-05-02
  • 打赏
  • 举报
回复
JON_WW:
PB
Win98
本人在连接数据库时出现目录表不能被建立:catalog tables could not to be created and are not available for use.请各位大虾帮忙。THANK YOU!

回答:

开发时,联接数据库的用户要有DBO的权限!!
havesnow看了以上解答后问如何建立用户的DBO的权限 ?
JiangAn回答说:
可能我有点错了,具体内容请参阅《PB ONLINE BOOK》中的《Connecting to your DataBase》中的"Chapter 4:Manager Database Connections"中的“about the powerbuilder repository”,下面就是文章。一开始联接时的用户要有建表的权限,不同的数据库有不同的做法,如MS SQL SERVER中可在Enterprise Manager中的DATABASE--具体数据库--双击--permission设置。或更简单一点,将联接的用户当成DBO,还是在这个程序中,LOGINS--用户--双击--在相应的数据库中ALIAS设为DBO就可以了。SQL ANYWHERE中可用SQL CENTER设置,其它系统应该也差不多吧!
About the Powersoft repository
By default, PowerBuilder creates five Powersoft system tables the first time it connects to a database. These five tables, known collectively as the Powersoft repository , store extended attribute information (such as display formats, validation rules, and font information) about tables and columns in your database. You can also define extended attributes when you create or modify a table in PowerBuilder.

This section tells you how to:

lMake sure the Powersoft repository is created with the proper access rights

lDisplay and open a Powersoft repository table

lUnderstand the kind of information stored in the Powersoft repository

lControl repository access



Logging on to your database for the first time

By default, PowerBuilder creates the Powersoft repository the first time you connect to a database with PowerBuilder.

To ensure that PowerBuilder creates the repository tables with the proper access rights to make them available to all users, the first person to connect to the database with PowerBuilder must log on with the proper authority.



vTo ensure proper creation of the Powersoft repository:|Make sure the first person to connect to the database with PowerBuilder has sufficient authority to create tables and grant permissions to PUBLIC.This means that the first person to connect to the database should log on as the database owner, database administrator, system user, system administrator, or system owner, as specified by your DBMS.



Displaying the repository

PowerBuilder maintains the Powersoft repository automatically whenever you change the information for a table or column. The Powersoft system tables in the repository are different from the system tables provided by your DBMS.

If you want, you can display and open Powersoft repository tables in the Database painter just like other tables.



vTo display the Powersoft repository tables:1Open the Select Tables dialog box in the Database painter.FOR INFO For instructions, see the PowerBuilder User's Guide .

2Select the Show system tables checkbox.The Powersoft repository tables and DBMS system tables display in the tables list, as follows:

|Powersoft repository tables The five tables in the Powersoft repository are: pbcatcol, pbcatedt, pbcatfmt, pbcattbl, and pbcatvld.

|DBMS system tables The system tables supplied by the DBMS usually have a DBMS-specific prefix (such as sys or dbo ).

3Open a Powersoft repository table to display its contents.FOR INFO For instructions, see the PowerBuilder User's Guide .

Do not edit the repository tablesDo not change the values in the Powersoft repository tables.



Contents of the repository

PowerBuilder stores five types of extended attribute information in the Powersoft repository. (For more about the Powersoft repository, see the PowerBuilder User's Guide .)


novo 2003-05-02
  • 打赏
  • 举报
回复
QFabiusMaximus (Programmer) Feb 13, 2003
Hi
I need to connect the Powerbuilder development environment ( 7.03 ) to an MS Access97 DB and tables.
What I have:- An ODBC connection ( which connects! )
However; I get the message 'Catalog tables could not be created and are not available for use'. This is reflected
in the fact that I can look at the Access table names; however clicking into one of them for the data gets the message:- 'Table "Itemstatus" has no columns possible invalid table format'.
The Access db resides on a Network server; to which I have supplied a network drive connection. ( I have to supply the drive,path and db name when I connect ).
My odbc profile looks like this:-
// Profile PubAccessDB
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=MS Access 97 Database;UID=administrator;PWD=',ConnectOption='SQL_OPT_TRACEFILE,C:\Program Files\Sybase703\SQL.LOG'"

My questions would be How can I look at the data in the Access tables via this type of connection? Or, Do I have to go about connecting to the Access tables in a different manner?



Tek-Tips Forums is Member Supported. Click Here to donate.
OlanKnight (TechnicalUser) Feb 27, 2003
PowerBuilder has a set of tables that it inserts into every database: these are the CATALOG tables to which the error message refers.

The PB Installation CD includes a script to insert these tables into most of the standard databases on the market today. I do not know if ACCESS is included in this list, but even if it is not you can take one of the existing scripts and modify it for use with MS Access.

Once the PB Catalog tables have been included in the database, you'll have no further problems with PB interacting with MS Access.


Olan

QFabiusMaximus (Programmer) Feb 27, 2003
Thank You OlanKnight.
I'll look this up as soon as I can ( however I have managed
to temporarily miss-place the installation disks ).

QFabiusMaximus (Programmer) Mar 6, 2003
One script established the PowerBuilder catalog tables in the Access Database ( which got rid of the 'Catalog Tables are not available' message ); however the Access tables were
still not useable since none of the Access table information
had been loaded into them, so they still gave the 2nd message of table has no columns and/or invalide table format.

PowerObject (Programmer) Mar 10, 2003
If you don't want to use the PowerBuilder Catalog tables,
set the PBNoCatalog in the PB.ini file:

PBNoCatalog=1

Regards,

---
PowerObject!
-----------------------------------------
http://Groups.Yahoo.com/group/PowerObject
PowerBuilder / PFC Developers' Group



QFabiusMaximus (Programmer) Mar 11, 2003
Thanks PowerObject

However I want to use the PowerBuilder catalog

tables, if at all possible.

Interestingly,

if I create new Access tables with PB compatible data

types; I can then copy the access data table to table

within acccess and then go back through PowerBuilder to

pick up the new tables data ( almost! ). -- I'm still

trying to perfect this work-around.


novo 2003-05-02
  • 打赏
  • 举报
回复
StarQuest Technical Documents

Error "Catalog tables could not created..." with PowerBuilder
Last Technical Review: June 5, 1998
Last Update: April 16, 1999
Product: StarSQL
Version: 2.x, 3.x
Article ID: SQ0ADE0049


Abstract

When using PowerBuilder 5.0 against an AS/400, you receive an error Catalog tables could not be created and are not available for use.

Note: Powerbuilder version 6.0 and later does not exhibit this behavior.

Solution

Powerbuilder creates its own catalog tables, but these are not necessary for an ODBC connection to DB2. This error message will only occur during development.
To disable this option from the connection, add an entry NoCatalog=1 in the PB.INI file for the database profile that you have configured for StarSQL. Here is an example:

[Database]
DBMS=ODBC
Database= STELLA
UserId= PETER
DatabasePassword= XXXX
LogPassword=
ServerName= STELLA
LogId=
Lock=
DbParm=ConnectString='DSN=DB2;UID=PETER;PWD=XXXX;'
Prompt=0
NoCatalog=1


--------------------------------------------------------------------------------

datougui 2003-04-29
  • 打赏
  • 举报
回复 1
我在db proflie 中 点击test connction时,也会出现上次问题
小弟初学pb,望大家指点!

3,423

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 其他开发语言
社区管理员
  • 其他开发语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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