Hello,
I am trying to modify my MS SQL 2005 database by PowerDesigner model using PowerDesigner built-in Modify feature.
PD however seems to have problems reverse engineering the database.
I get tons of errors like this:
Reverse engineering tables...
Table _MyTable
Unable to list the columns.
[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.
SQLSTATE = 37000
It also seems that it generates incompatible SQL code when modifying the database. E.g. (Parentheses after nonclustered violates syntax)...
create table _H_IpNetworkToVlanNetwork (
ipNetAddress bigint null,
vpnNetId int null default 0,
vlanId int null,
_ChangeDate datetime null,
_ChangeType int null,
constraint PK__H_IPNETWORKTOVLANNETWORK primary key nonclustered ()
)
go
What may be wrong? Do I have badly configured PowerBuilder? Or maybe badly configured ODBC data source?
Thanks for any help.
I have PowerBuilder 12.1 and MS SQL 2005Sounds like a PB problem. So tell me again why you dropped this in the SQL Server forum?|||Oh, ok sorry, where should I put this then? Thanks|||It is partially a Power Designer problem, so knowing how it works helps, but the problem appears in SQL Server (in other words SQL 2005 is the first product to complain).
The problem is that you once had a primary key defined for the table, then you removed the PK definition. This leaves Power Designer a bit confused, since it never seems to figure out that there isn't really a PK anymore. The fine folks at Sybase have a hot fix for this problem, and it is going to be addressed in a future service pack.
The work around is to either a) re-declare a PK so that Power Designer can work with the existing table, or b) re-create the table inside Power Designer without specifying a PK. More than 95% of the time you really want to have a Primary Key and simply undefined it by accident.
-PatP|||Hello Pat,
Thanks for your reply.
I however don't seem to have any problem with primary keys. They are set the same way in the designer as they are in database. Or maybe I understood you incorrectly.
Thanks|||The empty set of parentheses in the PRIMARY KEY clause of your posted SQL indicates that PowerDesigner does not have any Primary Key defined for the _H_IpNetworkToVlanNetwork table. This normally means that you once had a Primary Key defined, but that somehow it is no longer defined.
-PatP|||Ok, now I get it. It was actually a different problem that I thought you were talking about. I think now all my problems are resolved, thanks for helping :-)
The problem was that I had wrong DMBS selected and there were some incompatibilities.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment