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.

Don´t retrieve rows when loading form

5 posts in DataWindow .NET Last posting was on 2004-12-17 12:15:00.0Z
Leonardo Pasta Posted on 2004-12-10 15:25:35.0Z
From: "Leonardo Pasta" <lhpasta@nada.yahoo.com>
Subject: Don´t retrieve rows when loading form
Newsgroups: sybase.public.datawindow.net
User-Agent: XanaNews/1.16.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Original-NNTP-Posting-Host: 200.253.2.218
Message-ID: <41b9bfea@forums-2-dub>
X-Original-Trace: 10 Dec 2004 07:25:30 -0800, 200.253.2.218
Lines: 19
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Dec 2004 07:25:32 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Dec 2004 07:25:35 -0800
X-Trace: forums-1-dub 1102692335 10.22.108.75 (10 Dec 2004 07:25:35 -0800)
X-Original-Trace: 10 Dec 2004 07:25:35 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:971
Article PK: 125397

Hi,
I am starting to learn/try the DataWindow.Net. The good news is that
it installed flawlessly on Delphi 2005, so now I am a proud
DataWindow.Net delphi developer. :)
But here goes my question:
I wan´t to display my datawindow without retrieve any data, Let´s say
I´m working with the supplier table, and my select is "select id, name,
(etc) from Supplier order by name"
I don´t wan´t to fetch all my suppliers from the DB when the form
loads, instead I wan´t to present to him an empty form, with buttons
for "Insert row" and "Query". I wan´t to retrieve data only when the
user query for it (filling the form fields).
Is it easy to do in DW? Can someone point me to the correct way to
implement it?

Thanks in advance,
Leonardo Pasta

PS: I am trying the 1.5 Beta version


FrankG Posted on 2004-12-10 16:25:06.0Z
Sender: 3181.41b9ca38.1804289383@sybase.com
From: FrankG
Newsgroups: sybase.public.datawindow.net
Subject: Re: Don´t retrieve rows when loading form
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b9cdde.3210.1681692777@sybase.com>
References: <41b9bfea@forums-2-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 10 Dec 2004 08:25:02 -0800, 10.22.241.42
Lines: 58
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Dec 2004 08:25:03 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Dec 2004 08:25:06 -0800
X-Trace: forums-1-dub 1102695906 10.22.108.75 (10 Dec 2004 08:25:06 -0800)
X-Original-Trace: 10 Dec 2004 08:25:06 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:975
Article PK: 125399

If you want to retrieve all rows only when the user wants to
see them, add a button to the webform. When RETRIEVE is
clicked -

//Connect to the database if not connected. Should really
try..catch
transaction1.Connect();

//set the transaction if it was not already set in the form
open(make sure to drag the transaction object to the form to
instantiate the object)
WebDataWindowControl1.SetTransaction(transaction1);
WebDataWindowControl1.Retrieve();

if you want to insert new rows, add a button with the
following code
WebDataWindowControl1.InsertRow(1);
WebDataWindowControl1.SetRow(1);

If you want the user to enter some data prior to retrieving
(ex. Last Name) and retrieve based on the user data, you can
add a parameter to the datawindow object and pass it in the
retrieve
WebDataWindowControl1.Retrieve(someLastName);

Alternative is to use
sSQL = WebDataWindowControl1.GetSqlSelect(); // get
current query
// modify the SQL
sSQL = sSQL + " where last_name like 'G%'";
WebDataWindowControl1.SetSqlSelect(sSQL); // modify
WebDataWindowControl1.Retrieve();

> Hi,
> I am starting to learn/try the DataWindow.Net. The good
> news is that it installed flawlessly on Delphi 2005, so
> now I am a proud DataWindow.Net delphi developer. :)
> But here goes my question:
> I wan´t to display my datawindow without retrieve any
> data, Let´s say I´m working with the supplier table,
and
> my select is "select id, name, (etc) from Supplier order
> by name"
> I don´t wan´t to fetch all my suppliers from the DB
when
> the form loads, instead I wan´t to present to him an
empty
> form, with buttons for "Insert row" and "Query". I wan´t
> to retrieve data only when the user query for it (filling
> the form fields).
> Is it easy to do in DW? Can someone point me to the
> correct way to implement it?
>
> Thanks in advance,
> Leonardo Pasta
>
> PS: I am trying the 1.5 Beta version


Leonardo Pasta Posted on 2004-12-10 18:49:20.0Z
From: "Leonardo Pasta" <lhpasta@nada.yahoo.com>
Subject: Re: retrieve rows when loading form
Newsgroups: sybase.public.datawindow.net
References: <41b9bfea@forums-2-dub> <41b9cdde.3210.1681692777@sybase.com>
User-Agent: XanaNews/1.16.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 200.253.2.218
X-Original-NNTP-Posting-Host: 200.253.2.218
Message-ID: <41b9efb0@forums-1-dub>
Date: 10 Dec 2004 10:49:20 -0800
X-Trace: forums-1-dub 1102704560 200.253.2.218 (10 Dec 2004 10:49:20 -0800)
X-Original-Trace: 10 Dec 2004 10:49:20 -0800, 200.253.2.218
Lines: 45
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:982
Article PK: 125405

Hi Frank,
Thank you for your explanations, still some doubts remain.... :)
What I originally thought is to set the datawindow to "Query Mode",
let the user fill the datawindow fields with the search conditions and
execute the query, but if I don´t issue a "retrieve" at the "form load"
event, the datawindow control does not load my datawindow object. Is
there any other method that "open" the datawindow without perform the
associated SQL?
Thanks in advance,
Leonardo Pasta

FrankG wrote:

> If you want to retrieve all rows only when the user wants to
> see them, add a button to the webform. When RETRIEVE is
> clicked -
>
> //Connect to the database if not connected. Should really
> try..catch
> transaction1.Connect();
>
> //set the transaction if it was not already set in the form
> open(make sure to drag the transaction object to the form to
> instantiate the object)
> WebDataWindowControl1.SetTransaction(transaction1);
> WebDataWindowControl1.Retrieve();
>
> if you want to insert new rows, add a button with the
> following code
> WebDataWindowControl1.InsertRow(1);
> WebDataWindowControl1.SetRow(1);
>
> If you want the user to enter some data prior to retrieving
> (ex. Last Name) and retrieve based on the user data, you can
> add a parameter to the datawindow object and pass it in the
> retrieve
> WebDataWindowControl1.Retrieve(someLastName);
>
> Alternative is to use
> sSQL = WebDataWindowControl1.GetSqlSelect(); // get
> current query
> // modify the SQL
> sSQL = sSQL + " where last_name like 'G%'";
> WebDataWindowControl1.SetSqlSelect(sSQL); // modify
> WebDataWindowControl1.Retrieve();


Robert Regnell Posted on 2004-12-17 00:41:44.0Z
From: "Robert Regnell" <rpr_no_spam_at_techassist_dot_com_no_spam>
Newsgroups: sybase.public.datawindow.net
References: <41b9bfea@forums-2-dub> <41b9cdde.3210.1681692777@sybase.com> <41b9efb0@forums-1-dub>
Subject: Re: retrieve rows when loading form
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
NNTP-Posting-Host: pcp01446806pcs.lebnon01.pa.comcast.net
X-Original-NNTP-Posting-Host: pcp01446806pcs.lebnon01.pa.comcast.net
Message-ID: <41c22b48$1@forums-1-dub>
Date: 16 Dec 2004 16:41:44 -0800
X-Trace: forums-1-dub 1103244104 68.83.61.95 (16 Dec 2004 16:41:44 -0800)
X-Original-Trace: 16 Dec 2004 16:41:44 -0800, pcp01446806pcs.lebnon01.pa.comcast.net
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:1129
Article PK: 125555

You might want to perform a WebDataWindowControl1.InsertRow(0) if ther eis
no initial retrieve performed.

Bob

"Leonardo Pasta" <lhpasta@nada.yahoo.com> wrote in message
news:41b9efb0@forums-1-dub...
> Hi Frank,
> Thank you for your explanations, still some doubts remain.... :)
> What I originally thought is to set the datawindow to "Query Mode",
> let the user fill the datawindow fields with the search conditions and
> execute the query, but if I don´t issue a "retrieve" at the "form load"
> event, the datawindow control does not load my datawindow object. Is
> there any other method that "open" the datawindow without perform the
> associated SQL?
> Thanks in advance,
> Leonardo Pasta
>
> FrankG wrote:
>
>> If you want to retrieve all rows only when the user wants to
>> see them, add a button to the webform. When RETRIEVE is
>> clicked -
>>
>> //Connect to the database if not connected. Should really
>> try..catch
>> transaction1.Connect();
>>
>> //set the transaction if it was not already set in the form
>> open(make sure to drag the transaction object to the form to
>> instantiate the object)
>> WebDataWindowControl1.SetTransaction(transaction1);
>> WebDataWindowControl1.Retrieve();
>>
>> if you want to insert new rows, add a button with the
>> following code
>> WebDataWindowControl1.InsertRow(1);
>> WebDataWindowControl1.SetRow(1);
>>
>> If you want the user to enter some data prior to retrieving
>> (ex. Last Name) and retrieve based on the user data, you can
>> add a parameter to the datawindow object and pass it in the
>> retrieve
>> WebDataWindowControl1.Retrieve(someLastName);
>>
>> Alternative is to use
>> sSQL = WebDataWindowControl1.GetSqlSelect(); // get
>> current query
>> // modify the SQL
>> sSQL = sSQL + " where last_name like 'G%'";
>> WebDataWindowControl1.SetSqlSelect(sSQL); // modify
>> WebDataWindowControl1.Retrieve();


Leonardo Pasta Posted on 2004-12-17 12:15:00.0Z
From: "Leonardo Pasta" <lhpasta@nada.yahoo.com>
Subject: Re: retrieve rows when loading form
Newsgroups: sybase.public.datawindow.net
References: <41b9bfea@forums-2-dub> <41b9cdde.3210.1681692777@sybase.com> <41b9efb0@forums-1-dub> <41c22b48$1@forums-1-dub>
User-Agent: XanaNews/1.16.5.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
NNTP-Posting-Host: 200.253.2.218
X-Original-NNTP-Posting-Host: 200.253.2.218
Message-ID: <41c2cdc4@forums-1-dub>
Date: 17 Dec 2004 04:15:00 -0800
X-Trace: forums-1-dub 1103285700 200.253.2.218 (17 Dec 2004 04:15:00 -0800)
X-Original-Trace: 17 Dec 2004 04:15:00 -0800, 200.253.2.218
Lines: 7
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:1133
Article PK: 125558


Robert Regnell wrote:

> You might want to perform a WebDataWindowControl1.InsertRow(0) if
> ther eis no initial retrieve performed.

Thank you very much, I wil try it!!
Leonardo Pasta