Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Create Web DW Dynamically

8 posts in General Discussion (old) Last posting was on 2000-03-31 15:17:52.0Z
Stephen Posted on 2000-03-29 21:50:06.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Create Web DW Dynamically
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Wed, 29 Mar 2000 16:50:06 -0500
Lines: 67
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_ew9t#icm$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25296
Article PK: 228489

Hi, there

I have tried to create a Web Datawindow dynamically. Here is what I have done:

1. Create a Frameset HTML page(left: s_dwinput.html; riht: s_dwresult.html);

2. Create a HTML page (s_dwinput.html) for the left frame:
<FORM id=FORM1 action="s_dwresult.html" method=post>
<H3 align=center>Please Select Columns and Click Create</H3>
<SELECT id=SELECT1 multiple name=columns>
<OPTION value="id" selected>Customer Id
<OPTION value="fname">First Name
<OPTION value="lname">Last Name
...
<OPTION value="phone">Phone
<OPTION value="company_name">Company Name</OPTION>
</SELECT>
<INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
</FORM>

3. Create a HTML page (right frame) receiving columns passed by left frame page
..
dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
"iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
"d_customer_list")
dwLocal.SetHTMLObjectName ("dwMine");
dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
V3;UID=dba;PWD=sql'", "", "", "", "", "")
var quote='\"';
// clear datawindow object
dwLocal.Modify("DataWindow.Table.Select=''");
dwobject = ""
if (document.value.id != "null"){
dwobject = "id,";
}
..
if (document.value.state != "null"){
dwobject += " state,";
}
..
if (document.value.zip != "null"){
dwobject += " zip";
}
..

if (dwobject != ""){
mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
rc = dwLocal.Modify(mod);
retVal = dwLocal.Retrieve();
}
..
// set page specific properties
dwLocal.SetSelfLink (document.name, "");
dwLocal.SetWeight (true, true, true, true, true);
document.Write( dwLocal.Generate() );
..

I have questions as follows:

1. When users select multi-selection, e.g. id, lname, state etc, and click
Submit button "Create DW", are those variables, id, lname, state passed
automatically to the target page, s_dwresult.html (ACTION=s_dwresult.html in
FORM)? or I have to use print.right.location.href=link... to pass variables?

2. When I click button "Create DW", the page s_dwinput.html (left frame)
disappears, and the page s_dwresult.html (right frame) does not show up. Why?

3. I also get error saying "Syntex error or access violation" in the right
frame.

Any help will be appreciated.

Stephen
---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Larry Cermak[Team Sybase] Posted on 2000-03-30 04:01:48.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: Create Web DW Dynamically
Date: Wed, 29 Mar 2000 22:01:48 -0600
Lines: 110
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node18.dhcpchi.dslspeed.zyan.com 208.41.199.18
Message-ID: <347_8V2014fm$GA.52@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25266
Article PK: 155393


> 1. When users select multi-selection, e.g. id, lname, state etc, and
click
> Submit button "Create DW", are those variables, id, lname, state passed
> automatically to the target page, s_dwresult.html (ACTION=s_dwresult.html
in
> FORM)? or I have to use print.right.location.href=link... to pass

variables?

If you used the action keyword, then they are available in the document
model.

>
> 2. When I click button "Create DW", the page s_dwinput.html (left frame)
> disappears, and the page s_dwresult.html (right frame) does not show up.
Why?

You need to specify a target or it will link into the same frame.

>
> 3. I also get error saying "Syntex error or access violation" in the
right
> frame.

Does the result dw exist? Any more info in the error? When does it occur?


--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

Web DataWindow Training
EAServer Training

"Stephen" <skinchu@bn.com> wrote in message
news:ew9t#icm$GA.201@forums.sybase.com...
> Hi, there
>
> I have tried to create a Web Datawindow dynamically. Here is what I have
done:
>
> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
s_dwresult.html);
>
> 2. Create a HTML page (s_dwinput.html) for the left frame:
> <FORM id=FORM1 action="s_dwresult.html" method=post>
> <H3 align=center>Please Select Columns and Click Create</H3>
> <SELECT id=SELECT1 multiple name=columns>
> <OPTION value="id" selected>Customer Id
> <OPTION value="fname">First Name
> <OPTION value="lname">Last Name
> ...
> <OPTION value="phone">Phone
> <OPTION value="company_name">Company Name</OPTION>
> </SELECT>
> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
> </FORM>
>
> 3. Create a HTML page (right frame) receiving columns passed by left
frame page
> ..
> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
> "d_customer_list")
> dwLocal.SetHTMLObjectName ("dwMine");
> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
> V3;UID=dba;PWD=sql'", "", "", "", "", "")
> var quote='\"';
> // clear datawindow object
> dwLocal.Modify("DataWindow.Table.Select=''");
> dwobject = ""
> if (document.value.id != "null"){
> dwobject = "id,";
> }
> ..
> if (document.value.state != "null"){
> dwobject += " state,";
> }
> ..
> if (document.value.zip != "null"){
> dwobject += " zip";
> }
> ..
>
> if (dwobject != ""){
> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
> rc = dwLocal.Modify(mod);
> retVal = dwLocal.Retrieve();
> }
> ..
> // set page specific properties
> dwLocal.SetSelfLink (document.name, "");
> dwLocal.SetWeight (true, true, true, true, true);
> document.Write( dwLocal.Generate() );
> ..
>
> I have questions as follows:
>
>
> Any help will be appreciated.
>
> Stephen
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Stephen Posted on 2000-03-30 16:18:41.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: Create Web DW Dynamically
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 30 Mar 2000 11:18:41 -0500
Lines: 105
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_4TFHdOmm$GA.298@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25222
Article PK: 155356

Larry

Thanks for your information.

>> 2. When I click button "Create DW", the page s_dwinput.html (left frame)
>> disappears, and the page s_dwresult.html (right frame) does not show up.
>Why?
>
>You need to specify a target or it will link into the same frame.

How could I specify a target (right frame) in a FORM (left frame)? Something
like following?
..
<FORM METHOD=POST ACTION="display.stm" ...>
..
<INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
</FORM>

But it doesn't work. Any suggestion?

Stephen



On Wed, 29 Mar 2000 22:01:48 -0600,
in powersoft.public.easerver
Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>> 1. When users select multi-selection, e.g. id, lname, state etc, and
>click
>> Submit button "Create DW", are those variables, id, lname, state passed
>> automatically to the target page, s_dwresult.html (ACTION=s_dwresult.html
>in
>> FORM)? or I have to use print.right.location.href=link... to pass
>variables?
>
>If you used the action keyword, then they are available in the document
>model.
>
>>
>> 2. When I click button "Create DW", the page s_dwinput.html (left frame)
>> disappears, and the page s_dwresult.html (right frame) does not show up.
>Why?
>
>You need to specify a target or it will link into the same frame.
>
>>
>> 3. I also get error saying "Syntex error or access violation" in the
>right
>> frame.
>
>Does the result dw exist? Any more info in the error? When does it occur?
>
>
>--
>
>Larry Cermak [Team Sybase]
>Corporate Technology Partners, Inc.
>www.ctpartners.com
>Web DataWindow Articles
>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>
>Web DataWindow Training
>EAServer Training
>
>"Stephen" <skinchu@bn.com> wrote in message
>news:ew9t#icm$GA.201@forums.sybase.com...
>> Hi, there
>>
>> I have tried to create a Web Datawindow dynamically. Here is what I have
>done:
>>
>> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
>s_dwresult.html);
>>
>> 2. Create a HTML page (s_dwinput.html) for the left frame:
>> <FORM id=FORM1 action="s_dwresult.html" method=post>
>> <H3 align=center>Please Select Columns and Click Create</H3>
>> <SELECT id=SELECT1 multiple name=columns>
>> <OPTION value="id" selected>Customer Id
>> <OPTION value="fname">First Name
>> <OPTION value="lname">Last Name
>> ...
>> <OPTION value="phone">Phone
>> <OPTION value="company_name">Company Name</OPTION>
>> </SELECT>
>> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
>> </FORM>
>>
>> 3. Create a HTML page (right frame) receiving columns passed by left
>frame page
>> ..
>> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
>> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
>> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
>> "d_customer_list")
>> dwLocal.SetHTMLObjectName ("dwMine");
>> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
>> V3;UID=dba;PWD=sql'", "", "", "", "", "")
>> var quote='\"';
>> // clear datawindow object
>> dwLocal.Modify("DataWindow.Table.Select=''");
>> dwobject = ""
>> if (document.value.id != "null"){
>> dwobject = "id,";
>> }
>> ..
>> if (document.value.state != "null"){
>> dwobject += " state,";
>> }
>> ..
>> if (document.value.zip != "null"){
>> dwobject += " zip";
>> }
>> ..
>>
>> if (dwobject != ""){
>> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
>> rc = dwLocal.Modify(mod);
>> retVal = dwLocal.Retrieve();
>> }
>> ..
>> // set page specific properties
>> dwLocal.SetSelfLink (document.name, "");
>> dwLocal.SetWeight (true, true, true, true, true);
>> document.Write( dwLocal.Generate() );
>> ..
>>
>> I have questions as follows:
>>
>>
>> Any help will be appreciated.
>>
>> Stephen
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Larry Cermak[Team Sybase] Posted on 2000-03-31 02:09:19.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: Create Web DW Dynamically
Date: Thu, 30 Mar 2000 20:09:19 -0600
Lines: 167
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node18.dhcpchi.dslspeed.zyan.com 208.41.199.18
Message-ID: <347_LcZQterm$GA.307@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com> <347_4TFHdOmm$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25155
Article PK: 154254

<FORM METHOD=POST ACTION="display.stm" target=right>

I think that's correct.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

Web DataWindow Training
EAServer Training

"Stephen" <skinchu@bn.com> wrote in message
news:4TFHdOmm$GA.298@forums.sybase.com...
> Larry
>
> Thanks for your information.
>
> >> 2. When I click button "Create DW", the page s_dwinput.html (left
frame)
> >> disappears, and the page s_dwresult.html (right frame) does not show
up.
> >Why?
> >
> >You need to specify a target or it will link into the same frame.
>
> How could I specify a target (right frame) in a FORM (left frame)?
Something
> like following?
> ..
> <FORM METHOD=POST ACTION="display.stm" ...>
> ..
> <INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
> </FORM>
>
> But it doesn't work. Any suggestion?
>
> Stephen
>
>
>
> On Wed, 29 Mar 2000 22:01:48 -0600,
> in powersoft.public.easerver
> Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
> >> 1. When users select multi-selection, e.g. id, lname, state etc, and
> >click
> >> Submit button "Create DW", are those variables, id, lname, state passed
> >> automatically to the target page, s_dwresult.html
(ACTION=s_dwresult.html
> >in
> >> FORM)? or I have to use print.right.location.href=link... to pass
> >variables?
> >
> >If you used the action keyword, then they are available in the document
> >model.
> >
> >>
> >> 2. When I click button "Create DW", the page s_dwinput.html (left
frame)
> >> disappears, and the page s_dwresult.html (right frame) does not show
up.
> >Why?
> >
> >You need to specify a target or it will link into the same frame.
> >
> >>
> >> 3. I also get error saying "Syntex error or access violation" in the
> >right
> >> frame.
> >
> >Does the result dw exist? Any more info in the error? When does it
occur?
> >
> >
> >--
> >
> >Larry Cermak [Team Sybase]
> >Corporate Technology Partners, Inc.
> >www.ctpartners.com
> >Web DataWindow Articles
> >(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> >
> >Web DataWindow Training
> >EAServer Training
> >
> >"Stephen" <skinchu@bn.com> wrote in message
> >news:ew9t#icm$GA.201@forums.sybase.com...
> >> Hi, there
> >>
> >> I have tried to create a Web Datawindow dynamically. Here is what I
have
> >done:
> >>
> >> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
> >s_dwresult.html);
> >>
> >> 2. Create a HTML page (s_dwinput.html) for the left frame:
> >> <FORM id=FORM1 action="s_dwresult.html" method=post>
> >> <H3 align=center>Please Select Columns and Click Create</H3>
> >> <SELECT id=SELECT1 multiple name=columns>
> >> <OPTION value="id" selected>Customer Id
> >> <OPTION value="fname">First Name
> >> <OPTION value="lname">Last Name
> >> ...
> >> <OPTION value="phone">Phone
> >> <OPTION value="company_name">Company Name</OPTION>
> >> </SELECT>
> >> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
> >> </FORM>
> >>
> >> 3. Create a HTML page (right frame) receiving columns passed by left
> >frame page
> >> ..
> >> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
> >> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
> >> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
> >> "d_customer_list")
> >> dwLocal.SetHTMLObjectName ("dwMine");
> >> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
> >> V3;UID=dba;PWD=sql'", "", "", "", "", "")
> >> var quote='\"';
> >> // clear datawindow object
> >> dwLocal.Modify("DataWindow.Table.Select=''");
> >> dwobject = ""
> >> if (document.value.id != "null"){
> >> dwobject = "id,";
> >> }
> >> ..
> >> if (document.value.state != "null"){
> >> dwobject += " state,";
> >> }
> >> ..
> >> if (document.value.zip != "null"){
> >> dwobject += " zip";
> >> }
> >> ..
> >>
> >> if (dwobject != ""){
> >> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
> >> rc = dwLocal.Modify(mod);
> >> retVal = dwLocal.Retrieve();
> >> }
> >> ..
> >> // set page specific properties
> >> dwLocal.SetSelfLink (document.name, "");
> >> dwLocal.SetWeight (true, true, true, true, true);
> >> document.Write( dwLocal.Generate() );
> >> ..
> >>
> >> I have questions as follows:
> >>
> >>
> >> Any help will be appreciated.
> >>
> >> Stephen
> >> ---== Posted via the PFCGuide Web Newsreader ==---
> >> http://www.pfcguide.com/_newsgroups/group_list.asp
> >
> >
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Stephen Posted on 2000-03-30 18:08:02.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: Create Web DW Dynamically
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Thu, 30 Mar 2000 13:08:02 -0500
Lines: 157
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_pg4hjLnm$GA.290@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com> <347_4TFHdOmm$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25205
Article PK: 228477


>>> 3. I also get error saying "Syntex error or access violation" in the
>>right
>>> frame.
>>
>>Does the result dw exist? Any more info in the error? When does it occur?

Well, the datawindow object d_customer_list exists in article.pbl, and its
select-contents will be modified anyway.

I've managed to passed variables from a SEELCTION list of a FORM to anther page
where Web Datawindow is to be created. The following script used to create
SELECT string and modify dw:

..
dwLocal.Modify("DataWindow.Table.Select=''");
if (typeof(document.value.choice) == "object")
{ var i = 0;
var ls_columns = "";
var ls_column = ""
while(exists(document.value.choice[i]))
{ if ls_columns != "" ls_columns = ls_columns + ", ";
ls_column = '~"customer~".~"' + document.value.choice[i] + '~"';
ls_columns = ls_columns + ls_column;
i++;
}
} else { ls_columns = document.value.choice; }

if (ls_columns != "")
{ ls_sql = 'SELECT ' + ls_columns + ' FROM ~"customer~"';
mod = "Datawindow.Table.Select=" + quote + ls_sql + quote;
// for testing
document.writeln(mod);
rc = dwLocal.Modify(mod);
if (rc != ""){ document.write("modify failed=" + rc "<BR>\n");}
}
..

From document.wrilteln(mod) above script, I can see the mod string is as follow:
Datawindow.Table.Select="SELECT ~"customer~".~"id~", ~"customer~".~"fname~",
~"customer~".~"lname~" FROM ~"customer~"", however, I'm getting error: "Error on
Retrieve: -1 Select error: SQLSTATE = S1002[Sybase][ODBC Driver]Invalid
descriptor index". I cannot figure out what's wrong with my mod string.

Do I have to apply SetTrans() again before Retrieve()?

Please help.

Stephen

On Thu, 30 Mar 2000 11:18:41 -0500,
in powersoft.public.easerver
Stephen <skinchu@bn.com> wrote:
>Larry
>
>Thanks for your information.
>
>>> 2. When I click button "Create DW", the page s_dwinput.html (left frame)
>>> disappears, and the page s_dwresult.html (right frame) does not show up.
>>Why?
>>
>>You need to specify a target or it will link into the same frame.
>
>How could I specify a target (right frame) in a FORM (left frame)? Something
>like following?
>...
><FORM METHOD=POST ACTION="display.stm" ...>
>...
><INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
></FORM>
>
>But it doesn't work. Any suggestion?
>
>Stephen
>
>
>
>On Wed, 29 Mar 2000 22:01:48 -0600,
> in powersoft.public.easerver
>Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>>> 1. When users select multi-selection, e.g. id, lname, state etc, and
>>click
>>> Submit button "Create DW", are those variables, id, lname, state passed
>>> automatically to the target page, s_dwresult.html (ACTION=s_dwresult.html
>>in
>>> FORM)? or I have to use print.right.location.href=link... to pass
>>variables?
>>
>>If you used the action keyword, then they are available in the document
>>model.
>>
>>>
>>> 2. When I click button "Create DW", the page s_dwinput.html (left frame)
>>> disappears, and the page s_dwresult.html (right frame) does not show up.
>>Why?
>>
>>You need to specify a target or it will link into the same frame.
>>
>>>
>>> 3. I also get error saying "Syntex error or access violation" in the
>>right
>>> frame.
>>
>>Does the result dw exist? Any more info in the error? When does it occur?
>>
>>
>>--
>>
>>Larry Cermak [Team Sybase]
>>Corporate Technology Partners, Inc.
>>www.ctpartners.com
>>Web DataWindow Articles
>>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>>
>>Web DataWindow Training
>>EAServer Training
>>
>>"Stephen" <skinchu@bn.com> wrote in message
>>news:ew9t#icm$GA.201@forums.sybase.com...
>>> Hi, there
>>>
>>> I have tried to create a Web Datawindow dynamically. Here is what I have
>>done:
>>>
>>> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
>>s_dwresult.html);
>>>
>>> 2. Create a HTML page (s_dwinput.html) for the left frame:
>>> <FORM id=FORM1 action="s_dwresult.html" method=post>
>>> <H3 align=center>Please Select Columns and Click Create</H3>
>>> <SELECT id=SELECT1 multiple name=columns>
>>> <OPTION value="id" selected>Customer Id
>>> <OPTION value="fname">First Name
>>> <OPTION value="lname">Last Name
>>> ...
>>> <OPTION value="phone">Phone
>>> <OPTION value="company_name">Company Name</OPTION>
>>> </SELECT>
>>> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
>>> </FORM>
>>>
>>> 3. Create a HTML page (right frame) receiving columns passed by left
>>frame page
>>> ..
>>> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
>>> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
>>> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
>>> "d_customer_list")
>>> dwLocal.SetHTMLObjectName ("dwMine");
>>> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
>>> V3;UID=dba;PWD=sql'", "", "", "", "", "")
>>> var quote='\"';
>>> // clear datawindow object
>>> dwLocal.Modify("DataWindow.Table.Select=''");
>>> dwobject = ""
>>> if (document.value.id != "null"){
>>> dwobject = "id,";
>>> }
>>> ..
>>> if (document.value.state != "null"){
>>> dwobject += " state,";
>>> }
>>> ..
>>> if (document.value.zip != "null"){
>>> dwobject += " zip";
>>> }
>>> ..
>>>
>>> if (dwobject != ""){
>>> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
>>> rc = dwLocal.Modify(mod);
>>> retVal = dwLocal.Retrieve();
>>> }
>>> ..
>>> // set page specific properties
>>> dwLocal.SetSelfLink (document.name, "");
>>> dwLocal.SetWeight (true, true, true, true, true);
>>> document.Write( dwLocal.Generate() );
>>> ..
>>>
>>> I have questions as follows:
>>>
>>>
>>> Any help will be appreciated.
>>>
>>> Stephen
>>> ---== Posted via the PFCGuide Web Newsreader ==---
>>> http://www.pfcguide.com/_newsgroups/group_list.asp
>>
>>
>
>---== Posted via the PFCGuide Web Newsreader ==---
>http://www.pfcguide.com/_newsgroups/group_list.asp

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Larry Cermak[Team Sybase] Posted on 2000-03-31 02:08:37.0Z
Newsgroups: sybase.public.easerver
From: "Larry Cermak[Team Sybase]" <lcermak@ctpartners.com>
Subject: Re: Create Web DW Dynamically
Date: Thu, 30 Mar 2000 20:08:37 -0600
Lines: 227
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
NNTP-Posting-Host: node18.dhcpchi.dslspeed.zyan.com 208.41.199.18
Message-ID: <347_axeGUerm$GA.298@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com> <347_4TFHdOmm$GA.298@forums.sybase.com> <347_pg4hjLnm$GA.290@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25156
Article PK: 154255

You need to store the datawindow in syntax mode, not graphic.

--

Larry Cermak [Team Sybase]
Corporate Technology Partners, Inc.
www.ctpartners.com
Web DataWindow Articles
(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)

Web DataWindow Training
EAServer Training

"Stephen" <skinchu@bn.com> wrote in message
news:pg4hjLnm$GA.290@forums.sybase.com...
> >>> 3. I also get error saying "Syntex error or access violation" in the
> >>right
> >>> frame.
> >>
> >>Does the result dw exist? Any more info in the error? When does it
occur?
>
> Well, the datawindow object d_customer_list exists in article.pbl, and its
> select-contents will be modified anyway.
>
> I've managed to passed variables from a SEELCTION list of a FORM to anther
page
> where Web Datawindow is to be created. The following script used to
create
> SELECT string and modify dw:
>
> ..
> dwLocal.Modify("DataWindow.Table.Select=''");
> if (typeof(document.value.choice) == "object")
> { var i = 0;
> var ls_columns = "";
> var ls_column = ""
> while(exists(document.value.choice[i]))
> { if ls_columns != "" ls_columns = ls_columns + ", ";
> ls_column = '~"customer~".~"' + document.value.choice[i] + '~"';
> ls_columns = ls_columns + ls_column;
> i++;
> }
> } else { ls_columns = document.value.choice; }
>
> if (ls_columns != "")
> { ls_sql = 'SELECT ' + ls_columns + ' FROM ~"customer~"';
> mod = "Datawindow.Table.Select=" + quote + ls_sql + quote;
> // for testing
> document.writeln(mod);
> rc = dwLocal.Modify(mod);
> if (rc != ""){ document.write("modify failed=" + rc "<BR>\n");}
> }
> ..
>
> From document.wrilteln(mod) above script, I can see the mod string is as
follow:
> Datawindow.Table.Select="SELECT ~"customer~".~"id~",
~"customer~".~"fname~",
> ~"customer~".~"lname~" FROM ~"customer~"", however, I'm getting error:
"Error on
> Retrieve: -1 Select error: SQLSTATE = S1002[Sybase][ODBC Driver]Invalid
> descriptor index". I cannot figure out what's wrong with my mod string.
>
> Do I have to apply SetTrans() again before Retrieve()?
>
> Please help.
>
> Stephen
>
> On Thu, 30 Mar 2000 11:18:41 -0500,
> in powersoft.public.easerver
> Stephen <skinchu@bn.com> wrote:
> >Larry
> >
> >Thanks for your information.
> >
> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
frame)
> >>> disappears, and the page s_dwresult.html (right frame) does not show
up.
> >>Why?
> >>
> >>You need to specify a target or it will link into the same frame.
> >
> >How could I specify a target (right frame) in a FORM (left frame)?
Something
> >like following?
> >...
> ><FORM METHOD=POST ACTION="display.stm" ...>
> >...
> ><INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
> ></FORM>
> >
> >But it doesn't work. Any suggestion?
> >
> >Stephen
> >
> >
> >
> >On Wed, 29 Mar 2000 22:01:48 -0600,
> > in powersoft.public.easerver
> >Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
> >>> 1. When users select multi-selection, e.g. id, lname, state etc, and
> >>click
> >>> Submit button "Create DW", are those variables, id, lname, state
passed
> >>> automatically to the target page, s_dwresult.html
(ACTION=s_dwresult.html
> >>in
> >>> FORM)? or I have to use print.right.location.href=link... to pass
> >>variables?
> >>
> >>If you used the action keyword, then they are available in the document
> >>model.
> >>
> >>>
> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
frame)
> >>> disappears, and the page s_dwresult.html (right frame) does not show
up.
> >>Why?
> >>
> >>You need to specify a target or it will link into the same frame.
> >>
> >>>
> >>> 3. I also get error saying "Syntex error or access violation" in the
> >>right
> >>> frame.
> >>
> >>Does the result dw exist? Any more info in the error? When does it
occur?
> >>
> >>
> >>--
> >>
> >>Larry Cermak [Team Sybase]
> >>Corporate Technology Partners, Inc.
> >>www.ctpartners.com
> >>Web DataWindow Articles
> >>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
> >>
> >>Web DataWindow Training
> >>EAServer Training
> >>
> >>"Stephen" <skinchu@bn.com> wrote in message
> >>news:ew9t#icm$GA.201@forums.sybase.com...
> >>> Hi, there
> >>>
> >>> I have tried to create a Web Datawindow dynamically. Here is what I
have
> >>done:
> >>>
> >>> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
> >>s_dwresult.html);
> >>>
> >>> 2. Create a HTML page (s_dwinput.html) for the left frame:
> >>> <FORM id=FORM1 action="s_dwresult.html" method=post>
> >>> <H3 align=center>Please Select Columns and Click Create</H3>
> >>> <SELECT id=SELECT1 multiple name=columns>
> >>> <OPTION value="id" selected>Customer Id
> >>> <OPTION value="fname">First Name
> >>> <OPTION value="lname">Last Name
> >>> ...
> >>> <OPTION value="phone">Phone
> >>> <OPTION value="company_name">Company Name</OPTION>
> >>> </SELECT>
> >>> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
> >>> </FORM>
> >>>
> >>> 3. Create a HTML page (right frame) receiving columns passed by left
> >>frame page
> >>> ..
> >>> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
> >>> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
> >>> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
> >>> "d_customer_list")
> >>> dwLocal.SetHTMLObjectName ("dwMine");
> >>> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
> >>> V3;UID=dba;PWD=sql'", "", "", "", "", "")
> >>> var quote='\"';
> >>> // clear datawindow object
> >>> dwLocal.Modify("DataWindow.Table.Select=''");
> >>> dwobject = ""
> >>> if (document.value.id != "null"){
> >>> dwobject = "id,";
> >>> }
> >>> ..
> >>> if (document.value.state != "null"){
> >>> dwobject += " state,";
> >>> }
> >>> ..
> >>> if (document.value.zip != "null"){
> >>> dwobject += " zip";
> >>> }
> >>> ..
> >>>
> >>> if (dwobject != ""){
> >>> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
> >>> rc = dwLocal.Modify(mod);
> >>> retVal = dwLocal.Retrieve();
> >>> }
> >>> ..
> >>> // set page specific properties
> >>> dwLocal.SetSelfLink (document.name, "");
> >>> dwLocal.SetWeight (true, true, true, true, true);
> >>> document.Write( dwLocal.Generate() );
> >>> ..
> >>>
> >>> I have questions as follows:
> >>>
> >>>
> >>> Any help will be appreciated.
> >>>
> >>> Stephen
> >>> ---== Posted via the PFCGuide Web Newsreader ==---
> >>> http://www.pfcguide.com/_newsgroups/group_list.asp
> >>
> >>
> >
> >---== Posted via the PFCGuide Web Newsreader ==---
> >http://www.pfcguide.com/_newsgroups/group_list.asp
>
> ---== Posted via the PFCGuide Web Newsreader ==---
> http://www.pfcguide.com/_newsgroups/group_list.asp


Stephen Posted on 2000-03-31 15:17:52.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: Create Web DW Dynamically
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Fri, 31 Mar 2000 10:17:52 -0500
Lines: 205
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_7mkPIRym$GA.307@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com> <347_4TFHdOmm$GA.298@forums.sybase.com> <347_pg4hjLnm$GA.290@forums.sybase.com> <347_axeGUerm$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25107
Article PK: 154205

Hi, Larry

I did store the datawindow object in syntex. I try the program this morning
again, and found something interesting. If I select all columns for Web
datawindow, the Web datawindow is created fine. However, if I select some of
the columns (e.g. id, fname, lname, address), I get the retrieve error message
again "Error on Retrieve:-1 Select error: SQLSTATE=S1002[Sybase][ODBC
Driver]Invalid descriptor index. I also use Describe() to see the modified
string, and I can the syntex after Modify() is "SELECT id,fname,lname,address
FROM customer", which is correct.

Is this a bug or something I'm missing?

Thanks for your help.

Stephen

On Thu, 30 Mar 2000 20:08:37 -0600,
in powersoft.public.easerver

Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>You need to store the datawindow in syntax mode, not graphic.
>
>--
>
>Larry Cermak [Team Sybase]
>Corporate Technology Partners, Inc.
>www.ctpartners.com
>Web DataWindow Articles
>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>
>Web DataWindow Training
>EAServer Training
>
>"Stephen" <skinchu@bn.com> wrote in message
>news:pg4hjLnm$GA.290@forums.sybase.com...
>> >>> 3. I also get error saying "Syntex error or access violation" in the
>> >>right
>> >>> frame.
>> >>
>> >>Does the result dw exist? Any more info in the error? When does it
>occur?
>>
>> Well, the datawindow object d_customer_list exists in article.pbl, and its
>> select-contents will be modified anyway.
>>
>> I've managed to passed variables from a SEELCTION list of a FORM to anther
>page
>> where Web Datawindow is to be created. The following script used to
>create
>> SELECT string and modify dw:
>>
>> ..
>> dwLocal.Modify("DataWindow.Table.Select=''");
>> if (typeof(document.value.choice) == "object")
>> { var i = 0;
>> var ls_columns = "";
>> var ls_column = ""
>> while(exists(document.value.choice[i]))
>> { if ls_columns != "" ls_columns = ls_columns + ", ";
>> ls_column = '~"customer~".~"' + document.value.choice[i] + '~"';
>> ls_columns = ls_columns + ls_column;
>> i++;
>> }
>> } else { ls_columns = document.value.choice; }
>>
>> if (ls_columns != "")
>> { ls_sql = 'SELECT ' + ls_columns + ' FROM ~"customer~"';
>> mod = "Datawindow.Table.Select=" + quote + ls_sql + quote;
>> // for testing
>> document.writeln(mod);
>> rc = dwLocal.Modify(mod);
>> if (rc != ""){ document.write("modify failed=" + rc "<BR>\n");}
>> }
>> ..
>>
>> From document.wrilteln(mod) above script, I can see the mod string is as
>follow:
>> Datawindow.Table.Select="SELECT ~"customer~".~"id~",
>~"customer~".~"fname~",
>> ~"customer~".~"lname~" FROM ~"customer~"", however, I'm getting error:
>"Error on
>> Retrieve: -1 Select error: SQLSTATE = S1002[Sybase][ODBC Driver]Invalid
>> descriptor index". I cannot figure out what's wrong with my mod string.
>>
>> Do I have to apply SetTrans() again before Retrieve()?
>>
>> Please help.
>>
>> Stephen
>>
>> On Thu, 30 Mar 2000 11:18:41 -0500,
>> in powersoft.public.easerver
>> Stephen <skinchu@bn.com> wrote:
>> >Larry
>> >
>> >Thanks for your information.
>> >
>> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
>frame)
>> >>> disappears, and the page s_dwresult.html (right frame) does not show
>up.
>> >>Why?
>> >>
>> >>You need to specify a target or it will link into the same frame.
>> >
>> >How could I specify a target (right frame) in a FORM (left frame)?
>Something
>> >like following?
>> >...
>> ><FORM METHOD=POST ACTION="display.stm" ...>
>> >...
>> ><INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
>> ></FORM>
>> >
>> >But it doesn't work. Any suggestion?
>> >
>> >Stephen
>> >
>> >
>> >
>> >On Wed, 29 Mar 2000 22:01:48 -0600,
>> > in powersoft.public.easerver
>> >Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>> >>> 1. When users select multi-selection, e.g. id, lname, state etc, and
>> >>click
>> >>> Submit button "Create DW", are those variables, id, lname, state
>passed
>> >>> automatically to the target page, s_dwresult.html
>(ACTION=s_dwresult.html
>> >>in
>> >>> FORM)? or I have to use print.right.location.href=link... to pass
>> >>variables?
>> >>
>> >>If you used the action keyword, then they are available in the document
>> >>model.
>> >>
>> >>>
>> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
>frame)
>> >>> disappears, and the page s_dwresult.html (right frame) does not show
>up.
>> >>Why?
>> >>
>> >>You need to specify a target or it will link into the same frame.
>> >>
>> >>>
>> >>> 3. I also get error saying "Syntex error or access violation" in the
>> >>right
>> >>> frame.
>> >>
>> >>Does the result dw exist? Any more info in the error? When does it
>occur?
>> >>
>> >>
>> >>--
>> >>
>> >>Larry Cermak [Team Sybase]
>> >>Corporate Technology Partners, Inc.
>> >>www.ctpartners.com
>> >>Web DataWindow Articles
>> >>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>> >>
>> >>Web DataWindow Training
>> >>EAServer Training
>> >>
>> >>"Stephen" <skinchu@bn.com> wrote in message
>> >>news:ew9t#icm$GA.201@forums.sybase.com...
>> >>> Hi, there
>> >>>
>> >>> I have tried to create a Web Datawindow dynamically. Here is what I
>have
>> >>done:
>> >>>
>> >>> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
>> >>s_dwresult.html);
>> >>>
>> >>> 2. Create a HTML page (s_dwinput.html) for the left frame:
>> >>> <FORM id=FORM1 action="s_dwresult.html" method=post>
>> >>> <H3 align=center>Please Select Columns and Click Create</H3>
>> >>> <SELECT id=SELECT1 multiple name=columns>
>> >>> <OPTION value="id" selected>Customer Id
>> >>> <OPTION value="fname">First Name
>> >>> <OPTION value="lname">Last Name
>> >>> ...
>> >>> <OPTION value="phone">Phone
>> >>> <OPTION value="company_name">Company Name</OPTION>
>> >>> </SELECT>
>> >>> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
>> >>> </FORM>
>> >>>
>> >>> 3. Create a HTML page (right frame) receiving columns passed by left
>> >>frame page
>> >>> ..
>> >>> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
>> >>> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
>> >>> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
>> >>> "d_customer_list")
>> >>> dwLocal.SetHTMLObjectName ("dwMine");
>> >>> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
>> >>> V3;UID=dba;PWD=sql'", "", "", "", "", "")
>> >>> var quote='\"';
>> >>> // clear datawindow object
>> >>> dwLocal.Modify("DataWindow.Table.Select=''");
>> >>> dwobject = ""
>> >>> if (document.value.id != "null"){
>> >>> dwobject = "id,";
>> >>> }
>> >>> ..
>> >>> if (document.value.state != "null"){
>> >>> dwobject += " state,";
>> >>> }
>> >>> ..
>> >>> if (document.value.zip != "null"){
>> >>> dwobject += " zip";
>> >>> }
>> >>> ..
>> >>>
>> >>> if (dwobject != ""){
>> >>> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
>> >>> rc = dwLocal.Modify(mod);
>> >>> retVal = dwLocal.Retrieve();
>> >>> }
>> >>> ..
>> >>> // set page specific properties
>> >>> dwLocal.SetSelfLink (document.name, "");
>> >>> dwLocal.SetWeight (true, true, true, true, true);
>> >>> document.Write( dwLocal.Generate() );
>> >>> ..
>> >>>
>> >>> I have questions as follows:
>> >>>
>> >>>
>> >>> Any help will be appreciated.
>> >>>
>> >>> Stephen
>> >>> ---== Posted via the PFCGuide Web Newsreader ==---
>> >>> http://www.pfcguide.com/_newsgroups/group_list.asp
>> >>
>> >>
>> >
>> >---== Posted via the PFCGuide Web Newsreader ==---
>> >http://www.pfcguide.com/_newsgroups/group_list.asp
>>
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp


Stephen Posted on 2000-03-31 15:17:02.0Z
Newsgroups: sybase.public.easerver
From: "Stephen" <skinchu@bn.com>
Organization: 161.221.10.36
X-Newsreader: AspNNTP 1.41 (Advent 2000, Inc.)
Subject: Re: Create Web DW Dynamically
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Date: Fri, 31 Mar 2000 10:17:02 -0500
Lines: 205
NNTP-Posting-Host: 207.156.232.4
Message-ID: <347_q0hqqQym$GA.307@forums.sybase.com>
References: <347_ew9t#icm$GA.201@forums.sybase.com> <347_8V2014fm$GA.52@forums.sybase.com> <347_4TFHdOmm$GA.298@forums.sybase.com> <347_pg4hjLnm$GA.290@forums.sybase.com> <347_axeGUerm$GA.298@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:25108
Article PK: 154207

Hi, Larry

I did store the datawindow object in syntex. I try the program this morning
again, and found something interesting. If I select all columns for Web
datawindow, the Web datawindow is created fine. However, if I select some of
the columns (e.g. id, fname, lname, address), I get the retrieve error message
again "Error on Retrieve:-1 Select error: SQLSTATE=S1002[Sybase][ODBC
Driver]Invalid descriptor index. I also use Describe() to see the modified
string, and I can the syntex after Modify() is "SELECT id,fname,lname,address
FROM customer", which is correct.

Is this a bug or something I'm missing?

Thanks for your help.

Stephen

On Thu, 30 Mar 2000 20:08:37 -0600,
in powersoft.public.easerver

Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>You need to store the datawindow in syntax mode, not graphic.
>
>--
>
>Larry Cermak [Team Sybase]
>Corporate Technology Partners, Inc.
>www.ctpartners.com
>Web DataWindow Articles
>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>
>Web DataWindow Training
>EAServer Training
>
>"Stephen" <skinchu@bn.com> wrote in message
>news:pg4hjLnm$GA.290@forums.sybase.com...
>> >>> 3. I also get error saying "Syntex error or access violation" in the
>> >>right
>> >>> frame.
>> >>
>> >>Does the result dw exist? Any more info in the error? When does it
>occur?
>>
>> Well, the datawindow object d_customer_list exists in article.pbl, and its
>> select-contents will be modified anyway.
>>
>> I've managed to passed variables from a SEELCTION list of a FORM to anther
>page
>> where Web Datawindow is to be created. The following script used to
>create
>> SELECT string and modify dw:
>>
>> ..
>> dwLocal.Modify("DataWindow.Table.Select=''");
>> if (typeof(document.value.choice) == "object")
>> { var i = 0;
>> var ls_columns = "";
>> var ls_column = ""
>> while(exists(document.value.choice[i]))
>> { if ls_columns != "" ls_columns = ls_columns + ", ";
>> ls_column = '~"customer~".~"' + document.value.choice[i] + '~"';
>> ls_columns = ls_columns + ls_column;
>> i++;
>> }
>> } else { ls_columns = document.value.choice; }
>>
>> if (ls_columns != "")
>> { ls_sql = 'SELECT ' + ls_columns + ' FROM ~"customer~"';
>> mod = "Datawindow.Table.Select=" + quote + ls_sql + quote;
>> // for testing
>> document.writeln(mod);
>> rc = dwLocal.Modify(mod);
>> if (rc != ""){ document.write("modify failed=" + rc "<BR>\n");}
>> }
>> ..
>>
>> From document.wrilteln(mod) above script, I can see the mod string is as
>follow:
>> Datawindow.Table.Select="SELECT ~"customer~".~"id~",
>~"customer~".~"fname~",
>> ~"customer~".~"lname~" FROM ~"customer~"", however, I'm getting error:
>"Error on
>> Retrieve: -1 Select error: SQLSTATE = S1002[Sybase][ODBC Driver]Invalid
>> descriptor index". I cannot figure out what's wrong with my mod string.
>>
>> Do I have to apply SetTrans() again before Retrieve()?
>>
>> Please help.
>>
>> Stephen
>>
>> On Thu, 30 Mar 2000 11:18:41 -0500,
>> in powersoft.public.easerver
>> Stephen <skinchu@bn.com> wrote:
>> >Larry
>> >
>> >Thanks for your information.
>> >
>> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
>frame)
>> >>> disappears, and the page s_dwresult.html (right frame) does not show
>up.
>> >>Why?
>> >>
>> >>You need to specify a target or it will link into the same frame.
>> >
>> >How could I specify a target (right frame) in a FORM (left frame)?
>Something
>> >like following?
>> >...
>> ><FORM METHOD=POST ACTION="display.stm" ...>
>> >...
>> ><INPUT TYPE="sumit" VALUE="Creat DW" TARGET="display.stm">
>> ></FORM>
>> >
>> >But it doesn't work. Any suggestion?
>> >
>> >Stephen
>> >
>> >
>> >
>> >On Wed, 29 Mar 2000 22:01:48 -0600,
>> > in powersoft.public.easerver
>> >Larry Cermak[Team Sybase] <lcermak@ctpartners.com> wrote:
>> >>> 1. When users select multi-selection, e.g. id, lname, state etc, and
>> >>click
>> >>> Submit button "Create DW", are those variables, id, lname, state
>passed
>> >>> automatically to the target page, s_dwresult.html
>(ACTION=s_dwresult.html
>> >>in
>> >>> FORM)? or I have to use print.right.location.href=link... to pass
>> >>variables?
>> >>
>> >>If you used the action keyword, then they are available in the document
>> >>model.
>> >>
>> >>>
>> >>> 2. When I click button "Create DW", the page s_dwinput.html (left
>frame)
>> >>> disappears, and the page s_dwresult.html (right frame) does not show
>up.
>> >>Why?
>> >>
>> >>You need to specify a target or it will link into the same frame.
>> >>
>> >>>
>> >>> 3. I also get error saying "Syntex error or access violation" in the
>> >>right
>> >>> frame.
>> >>
>> >>Does the result dw exist? Any more info in the error? When does it
>occur?
>> >>
>> >>
>> >>--
>> >>
>> >>Larry Cermak [Team Sybase]
>> >>Corporate Technology Partners, Inc.
>> >>www.ctpartners.com
>> >>Web DataWindow Articles
>> >>(http://sdn.sybase.com/sdn/appdev/get_doc.stm?loc=1001708)
>> >>
>> >>Web DataWindow Training
>> >>EAServer Training
>> >>
>> >>"Stephen" <skinchu@bn.com> wrote in message
>> >>news:ew9t#icm$GA.201@forums.sybase.com...
>> >>> Hi, there
>> >>>
>> >>> I have tried to create a Web Datawindow dynamically. Here is what I
>have
>> >>done:
>> >>>
>> >>> 1. Create a Frameset HTML page(left: s_dwinput.html; riht:
>> >>s_dwresult.html);
>> >>>
>> >>> 2. Create a HTML page (s_dwinput.html) for the left frame:
>> >>> <FORM id=FORM1 action="s_dwresult.html" method=post>
>> >>> <H3 align=center>Please Select Columns and Click Create</H3>
>> >>> <SELECT id=SELECT1 multiple name=columns>
>> >>> <OPTION value="id" selected>Customer Id
>> >>> <OPTION value="fname">First Name
>> >>> <OPTION value="lname">Last Name
>> >>> ...
>> >>> <OPTION value="phone">Phone
>> >>> <OPTION value="company_name">Company Name</OPTION>
>> >>> </SELECT>
>> >>> <INPUT value="Create DW" id=INPUT1 name="b_create" type="submit">
>> >>> </FORM>
>> >>>
>> >>> 3. Create a HTML page (right frame) receiving columns passed by left
>> >>frame page
>> >>> ..
>> >>> dwLocal = java.CreateComponent("DataWindow/HTMLGenerator",
>> >>> "iiop://localhost:9000", "jagadmin", "", "DataWindow/HTMLGenerator");
>> >>> retVal = dwLocal.SetDWObject ("d:\\projects\\articles\\articles.pbl",
>> >>> "d_customer_list")
>> >>> dwLocal.SetHTMLObjectName ("dwMine");
>> >>> dwLocal.SetTrans("ODBC","Disablebind=1,ConnectString='DSN=EAS Demo DB
>> >>> V3;UID=dba;PWD=sql'", "", "", "", "", "")
>> >>> var quote='\"';
>> >>> // clear datawindow object
>> >>> dwLocal.Modify("DataWindow.Table.Select=''");
>> >>> dwobject = ""
>> >>> if (document.value.id != "null"){
>> >>> dwobject = "id,";
>> >>> }
>> >>> ..
>> >>> if (document.value.state != "null"){
>> >>> dwobject += " state,";
>> >>> }
>> >>> ..
>> >>> if (document.value.zip != "null"){
>> >>> dwobject += " zip";
>> >>> }
>> >>> ..
>> >>>
>> >>> if (dwobject != ""){
>> >>> mod = "Datawindow.Table.Select=" + quote + dwobject + quote;
>> >>> rc = dwLocal.Modify(mod);
>> >>> retVal = dwLocal.Retrieve();
>> >>> }
>> >>> ..
>> >>> // set page specific properties
>> >>> dwLocal.SetSelfLink (document.name, "");
>> >>> dwLocal.SetWeight (true, true, true, true, true);
>> >>> document.Write( dwLocal.Generate() );
>> >>> ..
>> >>>
>> >>> I have questions as follows:
>> >>>
>> >>>
>> >>> Any help will be appreciated.
>> >>>
>> >>> Stephen
>> >>> ---== Posted via the PFCGuide Web Newsreader ==---
>> >>> http://www.pfcguide.com/_newsgroups/group_list.asp
>> >>
>> >>
>> >
>> >---== Posted via the PFCGuide Web Newsreader ==---
>> >http://www.pfcguide.com/_newsgroups/group_list.asp
>>
>> ---== Posted via the PFCGuide Web Newsreader ==---
>> http://www.pfcguide.com/_newsgroups/group_list.asp
>
>

---== Posted via the PFCGuide Web Newsreader ==---
http://www.pfcguide.com/_newsgroups/group_list.asp