You said you needed to dynamically create a DW at runtime.  The
syntaxFromSQL is the easiest way to do so.  You need to create an SQL SELECT
statement having the desired column names and types in a string.  For
example, if you wanted two numbers and a string in the "external", you might
say something like this:
      string ls_sql
      string ls_style
      string ls_err
      string ls_dwCreate
      ls_sql = "SELECT 1 numCol1, 2 numCol2, '' strcol1 FROM table"
      ls_style = "Style(Type=Grid)"
      ls_dwCreate = SQLCA.syntaxFromSQL(ls_sql, ls_style, ls_err)
      if (ls_err <> "") then
         // put your error processing here
         return
      end if
      dw_1.create(ls_dwCreate, ls_err)
      if (ls_err <> "") then
         // put more error processing here
         return
      end if
      // continue with normal processing

   At this point, dw_1 will have a dataObject that has two number columns
and a string column.  You can use it as if it is external.
   Obviously, this example isn't "dynamic", since I hard-coded the SELECT
statement in the string.  In your program, you should build the string
dynamically, using whatever business logic applies.  Then, use something
like the above to turn it into a dataWindow.

      --dang

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 24, 2000 17:40
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: PFCSIG External DW at runtime


Dang:
      
        I am not sure what exactly you mean? If I am not wrong syntaxfromsql
is used for dw with a sql syntax right? In my case it is an external dw.

Thanks
Josh


> [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