Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Connect PowerBuilder to MS Access tables

Status
Not open for further replies.

DilbertPCer

Programmer
Feb 7, 2003
17
US
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?
 
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
 
Thank You OlanKnight.
I'll look this up as soon as I can ( however I have managed
to temporarily miss-place the installation disks ).
 
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.
 
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.
 
Putting in the PowerBuilder Catalog tables seems to be the correct solution. Some interesting things:-

PowerBuilder gives the Invalid Table/Column format message when it actually is an permissions problem, I.e., the tables were established under one userid and the access (pun!) application userid was different so that caused problems.
Also; I established the PB Catalog tables under one access
userid when I should have used the one used in Access to
establish the access tables.
Also; after all of this is resolved PowerBuilder did not like the Access Queries attached to the access tables; so
it doesn't let you see those.-still working on that one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top