1. Cynthia Nixon
  2. PowerBuilder
  3. Thursday, 29 August 2019 17:48 PM UTC

I'm receiving the error:  "Select Error: Column lists do not match" for a datawindow accessing a database table.  The datawindow column is defined as type=decimal(0).  The database column is defined as (numeric(3,0), not null).

Could this be the cause of my error? If so, can you advise on how the datawindow column should be defined to match the database column?

Priority is critical due to a release deadline.  Thanks in advance.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 29 August 2019 18:09 PM UTC
  2. PowerBuilder
  3. # 1

Hi Cynthia;

  Since you have not given us much information to go on for this posting (Error #, DBMS type, Connection Type, SQL Syntax, Table specification, etc)... It's hard to say.

  My guess is that the DWO's column names do not match the corresponding Table(s) column names. Were there schema changes recently?

Regards ... Chris

Comment
There are no comments made yet.
Cynthia Nixon Accepted Answer Pending Moderation
  1. Thursday, 29 August 2019 19:08 PM UTC
  2. PowerBuilder
  3. # 2

I am migrating a PowerBuilder 9.0.3 application to PowerBuilder 2019. There is a possibility that the columns have changed.

We now use SQL Server 2012, SQL Server Native Client 11.0.

 

Here is exactly how the PowerBuilder error window is displayed:  DataWindow Error (in the header)  Select Error: Column lists do not match.

 

Here is the database table info. The column in question is PLAN_SEQ(PK, numeric(3,0), not null)

Table PMTLACST

Column Name     DataType

PLAN_SEQ          numeric(3, 0)

 

 

Export snippet from the datawindow

table(

column=(type=decimal(0) updatewhereclause=yes name=plan_seq dbname="PMTLACST.PLAN_SEQ" )

 

**The datawindow does a select for several other columns from other tables. However, they all match. This is the only column in question.

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 29 August 2019 19:15 PM UTC
If you build a new DW on the PMTLACST table from SS (you do not have to save it) ... what does the new DW state as the column type for the PLAN_SEQ column?
  1. Helpful
  1. Cynthia Nixon
  2. Thursday, 29 August 2019 19:37 PM UTC
Good test. I created a new DW as you suggested. The (type=decimal(0) is still shown. So the original seems correct. I'll try doing the same for all the columns in the datawindow to see if I can determine which is actually giving me the error. Thanks!
  1. Helpful
There are no comments made yet.
Cynthia Nixon Accepted Answer Pending Moderation
  1. Thursday, 29 August 2019 19:11 PM UTC
  2. PowerBuilder
  3. # 3

Just realized that I can add a PDF file.  Attached

Attachments (1)
Comment
There are no comments made yet.
Matthew Balent Accepted Answer Pending Moderation
  1. Friday, 30 August 2019 12:22 PM UTC
  2. PowerBuilder
  3. # 4

You should also consider running a trace of the database when the DW retrieve is executed.  This will show exactly the SQL which is sent to the DB.

Comment
  1. Cynthia Nixon
  2. Friday, 30 August 2019 16:12 PM UTC
Thanks Matthew. Yes, this helped! I now see the mismatched columns (as I also recreated the datawindow). Thanks everyone!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.