I found the problem after locating column 1604.  At first I thought it
was because I had forgotten to SetTransObject() but that didn't help.
It was the Quotes around the table/column names.

The TABLE lines were taken directly from an export of a template DW.
Funnily enough, the export created ~" around the table/column names even
though in the profile for the DB "Enclose Table and Column Names in
Quotes" is unchecked.  As a punt, I took them out and tried again and
viola! - no error. Truth be known, it would've taken a month of Sunday's
for anybody else to work this one out.  At any rate, I'd still welcome
any comments on the code... :-)

At the end of all this I suppose a word of advise - don't trust
Library->Export to respect other settings within the IDE ( PB6.5.1 ).

Best Regards
+-----------------------------------------------------------------------
----------------------------------+
  Bruce Nordstrand

  KSL Consulting Pty Ltd
  P.O. Box 4852, North Rocks, NSW 2151, Australia

  Phone: +61 2 9873-6256        Fax: +61 2 9873-6216
  Email:  [EMAIL PROTECTED]    Web: http://www.ksl.com.au
+-----------------------------------------------------------------------
----------------------------------+
                PCDocs/Fulcrum <http://www.pcdocs.com/> Alliance Network
Member



> -----Original Message-----
> From: Bruce Nordstrand [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, 26 August 1999 2:39 am
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: Sorta PFC - DW creation
> 
> Thanks everyone and on John's suggestion here's what I'm doing:
> 
> Called as of_CreatwDWObject( as_createstmt, ai_numweeks ) -> integer.
> Resulting DW is a N-Up with <n> columns:
> 
> string        ls_newobject
> string        ls_header
> string        ls_dwdefinition
> string        ls_errorbuffer
> string        ls_footer
> 
> integer       li_rc
> integer       li_xstart = 14
> integer       li_xincr = 274
> integer li_xval = 0
> integer li_counter
> 
> n_ds          lds_test
> 
> /* Create the DW header */
> ls_header = &
>       'release 6; '+ &
>       'datawindow(units=0 '+ &
>               'timer_interval=0 ' + &
>               'color=1073741824 processing=0 print.documentname="" ' +
> &
>               'print.orientation = 0 print.margin.left = 110
> print.margin.right = 110 ' + & 
>               'print.margin.top = 96 print.margin.bottom = 96
> print.paper.source = 0 ' + &
>               'print.paper.size = 0 print.prompt=no print.buttons=no
> print.preview.buttons=no rows_per_detail = ' + String( ai_numweeks ) +
> '
> ) ' + &
>       'header(height=68 color="536870912" ) ' + &
>       'summary(height=0 color="536870912" ) ' + &
>       'footer(height=0 color="536870912" ) ' + &
>       'detail(height=72 color="536870912" ) ' + &
>       'table(column=(type=number updatewhereclause=yes
> name=phase_value dbname="promproductphase.phase_value" ) ' + & 
>       'column=(type=long updatewhereclause=yes key=yes
> name=product_pkid dbname="promproductphase.product_pkid" ) ' + & 
>       'column=(type=long updatewhereclause=yes key=yes
> name=promotion_pkid dbname="promproductphase.promotion_pkid" )  ' + &
>       'column=(type=datetime updatewhereclause=yes key=yes name=week
> dbname="promproductphase.week" )  ' + &
>       'column=(type=long updatewhereclause=yes name=user_est_incunits
> dbname="promproductphase.user_est_incunits" ) ' + &
>       'column=(type=long updatewhereclause=yes name=user_est_xfcases
> dbname="promproductphase.user_est_xfcases" ) ' + &
>       'column=(type=long updatewhereclause=yes name=user_scan_cases
> dbname="promproductphase.user_scan_cases" ) ' + &
>       'column=(type=long updatewhereclause=yes name=sys_est_incunits
> dbname="promproductphase.sys_est_incunits" ) ' + &
>       'column=(type=long updatewhereclause=yes name=sys_est_xfcases
> dbname="promproductphase.sys_est_xfcases" ) ' + &
>       'column=(type=long updatewhereclause=yes name=regular_units
> dbname="promproductphase.regular_units" ) ' + &       
>       'retrieve="PBSELECT( VERSION(400)
> TABLE(NAME=~"promproductphase~" ) ' + &
>       'COLUMN(NAME=~"promproductphase.phase_value~") ' + & 
>       'COLUMN(NAME=~"promproductphase.product_pkid~") ' + & 
>       'COLUMN(NAME=~"promproductphase.promotion_pkid~") ' + & 
>       'COLUMN(NAME=~"promproductphase.week~") ' + & 
>       'COLUMN(NAME=~"promproductphase.user_est_incunits~") ' + & 
>       'COLUMN(NAME=~"promproductphase.user_est_xfcases~") ' + & 
>       'COLUMN(NAME=~"promproductphase.user_scan_cases~") ' + & 
>       'COLUMN(NAME=~"promproductphase.sys_est_incunits~") ' + & 
>       'COLUMN(NAME=~"promproductphase.sys_est_xfcases~") ' + & 
>       'COLUMN(NAME=~"promproductphase.regular_units~") )" ' + & 
>       'update="promproductphase" updatewhere=0 updatekeyinplace=no ) '
> 
> ls_dwdefinition = ls_header
> 
> /* Add the correct number of text headers for passed in weeks */      
> FOR li_counter = 1 to ai_numweeks
>       IF li_counter = 1 THEN
>               li_xval += li_xstart
>       ELSE
>               li_xval += li_xincr
>       END IF  
>               
>       ls_newobject = + &
>               'text(band=header alignment="2" text="Wk ' + String(
> li_Counter ) +'/' + String( ai_numweeks ) + '" border="6" color="0"
> x="'
> + String( li_xval ) + '" y="8" height="52" width="256" ' + & 
>                       'name=phase_value_t_' + String( li_counter ) + '
> font.face="Tahoma" font.height="-8" font.weight="400"  font.family="2"
> font.pitch="2" font.charset="0" ' + &
>                       'background.mode="2" background.color="79741120"
> ) ' 
>                       
>       ls_dwdefinition = ls_dwdefinition + ls_newobject                
>       
> NEXT
> 
> /* Reset li_xval for next incementing loops */
> li_xval = 0
> 
> /* Add the correct number of DE columns for passed in weeks */
> 
> FOR li_counter = 1 to ai_numweeks
>       IF li_counter = 1 THEN
>               li_xval += li_xstart
>       ELSE
>               li_xval += li_xincr
>       END IF          
> 
>       ls_newobject = + &
>                       'column(band=detail id=1 alignment="2"
> tabsequence=' + String( (10 * li_counter ) ) + ' border="0" color="0"
> x="' + String( li_xval ) + '" y="4" height="60" width="256" ' + &
>                               'format="[general]" row_in_detail=' +
> String( li_counter ) + ' name=phase_value_' + String( li_counter ) + '
> edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes '
> +
> &  
>                               'font.face="Tahoma" font.height="-8"
> font.weight="400"  font.family="2" font.pitch="2" font.charset="0"
> background.mode="1" background.color="553648127" ) ' 
> 
>       ls_dwdefinition = ls_dwdefinition + ls_newobject                
> 
> NEXT
> 
> ls_footer = 'htmltable(border="1" cellpadding="0" cellspacing="0"
> generatecss="no" nowrap="yes") '
> 
> ls_dwdefinition = ls_dwdefinition + ls_footer
> 
> // Create a temporary Datastore to test the DataWindow Object.
> lds_test = Create n_ds
> 
> // Test the datastore.
> li_rc = lds_test.Create ( ls_dwdefinition, ls_errorbuffer)
>  
> // Destroy the temporary DataStore.
> If IsValid(lds_test) Then
>       Destroy lds_test
> End If
> 
> // If OK, populate the reference variables.
> //If li_rc = 1 Then
>       as_createstmt = ls_dwdefinition
> //End If
> 
> RETURN li_rc
> 
> 
> Thanks again in advance...
> 
> Regards
> 
> +---------------------------------------------------------------------
> --
> ----------------------------------+
>   Bruce Nordstrand
> 
>   KSL Consulting Pty Ltd
>   P.O. Box 4852, North Rocks, NSW 2151, Australia
> 
>   Phone: +61 2 9873-6256        Fax: +61 2 9873-6216
>   Email:  [EMAIL PROTECTED]    Web: http://www.ksl.com.au
> +---------------------------------------------------------------------
> --
> ----------------------------------+
>               PCDocs/Fulcrum <http://www.pcdocs.com/> Alliance Network
> Member
> 
> 
> 
> > -----Original Message-----
> > From:       John DeLello [SMTP:[EMAIL PROTECTED]]
> > Sent:       Thursday, 26 August 1999 2:21 am
> > To: [EMAIL PROTECTED]
> > Subject:    RE: Sorta PFC - DW creation
> > 
> > Hi Bruce,
> > 
> > Post the code up so we can see what you are doing. Column refers the
> > character position in the syntax string.
> > 
> > John De Lello
> > DelWare Consulting Group
> > Programming solutions for today's complex problems
> > http://www.DelWare.com
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf
> > Of Bruce Nordstrand
> > Sent: Wednesday, August 25, 1999 11:46 AM
> > To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
> > Subject: Sorta PFC - DW creation
> > 
> > 
> > Hi All
> > 
> > I have created a user object which will dynamically create a DW
> > object.
> > I have modelled the code on
> > ..._winsrv_statusbar.of_CreateDWObject(...).
> > Unfortunately I am getting an error containing "Line 1 Column 1604:
> > incorrect syntax".  My question is what exactly is termed a column
> in
> > the syntax so I know where to start looking..
> > 
> > If anybody want's to be *really* helpful, I will post the code for
> > anyone's inspection ;-).
> > 
> > Hope someone out there can help
> > 
> > Regards
> > 
> >
> +---------------------------------------------------------------------
> > --
> > ----------------------------------+
> >   Bruce Nordstrand
> > 
> >   KSL Consulting Pty Ltd
> >   P.O. Box 4852, North Rocks, NSW 2151, Australia
> > 
> >   Phone: +61 2 9873-6256        Fax: +61 2 9873-6216
> >   Email:  [EMAIL PROTECTED]    Web: http://www.ksl.com.au
> >
> +---------------------------------------------------------------------
> > --
> > ----------------------------------+
> >             PCDocs/Fulcrum <http://www.pcdocs.com/> Alliance Network
> > Member
> > 
> > 
> > 
> > ===========================================================
> > This List brought to you by DelWare Consulting Group. Visit
> > our site http://www.DelWare.com today!
> > 
> > Please, no employment posts!
> > 
> > To unsubscribe send mail to [EMAIL PROTECTED]
> > UNSUBSCRIBE PBPFC FirstName LastName
> > ===========================================================
> > This List brought to you by DelWare Consulting Group. Visit
> > our site http://www.DelWare.com today!
> > 
> > Please, no employment posts!
> > 
> > To unsubscribe send mail to [EMAIL PROTECTED]
> > UNSUBSCRIBE PBPFC FirstName LastName
> ===========================================================
> This List brought to you by DelWare Consulting Group. Visit
> our site http://www.DelWare.com today!
> 
> Please, no employment posts!
> 
> To unsubscribe send mail to [EMAIL PROTECTED]
> UNSUBSCRIBE PBPFC FirstName LastName
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to