Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Location
    Plzeň, Czech Republic
    Posts
    10

    Red face Unanswered: PowerDesigner problem

    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:
    Code:
    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)...

    Code:
    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 2005
    Last edited by jsiii; 03-05-07 at 03:25. Reason: Wrong title

  2. #2
    Join Date
    Jan 2004
    Location
    In a large office with bad lighting
    Posts
    1,040
    Sounds like a PB problem. So tell me again why you dropped this in the SQL Server forum?

    -- This is all just a Figment of my Imagination --

  3. #3
    Join Date
    Mar 2007
    Location
    Plzeň, Czech Republic
    Posts
    10
    Oh, ok sorry, where should I put this then? Thanks

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

  5. #5
    Join Date
    Mar 2007
    Location
    Plzeň, Czech Republic
    Posts
    10
    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

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    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

  7. #7
    Join Date
    Mar 2007
    Location
    Plzeň, Czech Republic
    Posts
    10
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •