1. John Murphy
  2. PowerBuilder
  3. Sunday, 24 May 2020 13:08 PM UTC

I think this is a bug but I thought I post it here first it case I'm just wacky.

I am using SQLCA.SyntaxFromSQL to build a DW on the fly. Since all the key fields were included it makes the dw updatable. This works fine except in the case where there is a SQL computed field. It marks the field as updatable and also sets it as the "identity" column. PB does not seem to have a problem with it but my program is trying evaluate DB updates before they happen and this messes it up.

ls_syntax = SQLCA.SyntaxFromSQL(ls_sql, 'Style(Type=Grid)', ls_error)

dw_dynamic.Create(ls_syntax, ls_error)

release 19;
datawindow(units=0 timer_interval=0 color=1073741824 processing=1 print.margin.bottom=96 print.margin.left=110 print.margin.right=110 print.margin.top=96 print.preview.buttons=no )
table(
column=(type=char(2) update=yes key=yes updatewhereclause = yes name=corp dbname="corp")
column=(type=char(2) update=yes key=yes updatewhereclause = yes name=branch dbname="pmf.branch")
column=(type=char(20) update=yes key=yes updatewhereclause = yes name=product_no dbname="pmf.product_no")
column=(type=char(50) update=yes updatewhereclause = yes name=description dbname="pmf.description")
column=(type=decimal(4) update=yes updatewhereclause = yes name=total_cost dbname="pmf.total_cost")
column=(type=decimal(6) update=yes identity=yes updatewhereclause = yes name=new_cost dbname="new_cost")
retrieve="SELECT TOP(100) pmf.corp, pmf.branch, pmf.product_no, pmf.description, pmf.total_cost, pmf.total_cost * 1.10 AS ~"new_cost~" FROM pmf WHERE pmf.corp = '01' AND pmf.branch = '00' AND pmf.total_cost > 100"
update="pmf" updatewhere=1)

mike S Accepted Answer Pending Moderation
  1. Sunday, 24 May 2020 14:00 PM UTC
  2. PowerBuilder
  3. # 1

You need to post it as a bug.  lots of stuff in this that doesn't make sense.  this seems mostly based on sql syntax from 1990 and was never updated

Comment
  1. John Murphy
  2. Sunday, 24 May 2020 21:53 PM UTC
Well the 90's seem quite fresh to these tables. They we originally laid out as isam files in the early 70's.
  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.