What's the fastest way to export and import DW data?

Our app's resize service sometimes sets the height of the
details band to 0, before it resizes a datawindow. This
makes the resize much faster, but it has a side effect: If
the user has typed anything into the datawindow, and that
datawindow is then resized, the data the user has entered
will be cleared.

I'm looking for a way to quickly export the newly entered
data before the resize, and import it back afterwards. This
is not such a hard task in general, but I'd like it to be
done as quickly as possible, in order not to stall the
resize.

Bonus question - is there any immediate way to tell if a
user has changed the content of a dw? The check should be
made from within a generic resize service, so I can't add
any code to the dw's events.
0
Eran
12/29/2010 7:10:18 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

8 Replies
774 Views

Similar Articles

[PageSpeed] 0

What if you use the rowscopy function and copy the row(s) to a datastore 
for safe keeping while you're doing your resizing? Then use it the other 
way to put them back.

For the bonus question you could call the modifiedcount and deletedcount 
functions. The sum is the number of rows that changed.

hth,
Mark

On 12/29/2010 2:10 AM, Eran wrote:
> Our app's resize service sometimes sets the height of the
> details band to 0, before it resizes a datawindow. This
> makes the resize much faster, but it has a side effect: If
> the user has typed anything into the datawindow, and that
> datawindow is then resized, the data the user has entered
> will be cleared.
>
> I'm looking for a way to quickly export the newly entered
> data before the resize, and import it back afterwards. This
> is not such a hard task in general, but I'd like it to be
> done as quickly as possible, in order not to stall the
> resize.
>
> Bonus question - is there any immediate way to tell if a
> user has changed the content of a dw? The check should be
> made from within a generic resize service, so I can't add
> any code to the dw's events.
0
Mark
12/29/2010 1:51:52 PM
Thanks, Mark.

The bonus is yours. This is what I was looking for.

As for the main issue, your suggestion makes sense, but will
the status of the copied rows be maintained? I'd like this
backup and restore to be absolutely transparent to the rest
of the code. (probably a classic question here - I'm kind of
rusty in PB programming...)


> What if you use the rowscopy function and copy the row(s)
> to a datastore  for safe keeping while you're doing your
> resizing? Then use it the other  way to put them back.
>
> For the bonus question you could call the modifiedcount
> and deletedcount  functions. The sum is the number of rows
> that changed.
>
> hth,
> Mark
0
Eran
12/29/2010 2:57:39 PM
The description of rowscopy() states that the status of each row is set 
to NewModified!. If that works for you then I'd say you'll be fine. If 
not, you'll need a more detailed approach of capturing each rows status 
using getitemstatus().

FWIW If you're doing PB being rusty comes with the territory. :)



On 12/29/2010 9:57 AM, Eran wrote:
> Thanks, Mark.
>
> The bonus is yours. This is what I was looking for.
>
> As for the main issue, your suggestion makes sense, but will
> the status of the copied rows be maintained? I'd like this
> backup and restore to be absolutely transparent to the rest
> of the code. (probably a classic question here - I'm kind of
> rusty in PB programming...)
>
>
>> What if you use the rowscopy function and copy the row(s)
>> to a datastore  for safe keeping while you're doing your
>> resizing? Then use it the other  way to put them back.
>>
>> For the bonus question you could call the modifiedcount
>> and deletedcount  functions. The sum is the number of rows
>> that changed.
>>
>> hth,
>> Mark
0
Mark
12/29/2010 3:15:35 PM
GetFullState(), GetChanges(), SetChanges() ?

Report Bugs to Sybase:  http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

On 12/29/2010 2:10 AM, Eran wrote:
> Our app's resize service sometimes sets the height of the
> details band to 0, before it resizes a datawindow. This
> makes the resize much faster, but it has a side effect: If
> the user has typed anything into the datawindow, and that
> datawindow is then resized, the data the user has entered
> will be cleared.
>
> I'm looking for a way to quickly export the newly entered
> data before the resize, and import it back afterwards. This
> is not such a hard task in general, but I'd like it to be
> done as quickly as possible, in order not to stall the
> resize.
>
> Bonus question - is there any immediate way to tell if a
> user has changed the content of a dw? The check should be
> made from within a generic resize service, so I can't add
> any code to the dw's events.
0
Jerry
12/29/2010 6:05:03 PM
You should be fixing the root problem. Instead of setting the band 
height to zero, call SetRedraw(False).

On 12/29/2010 2:10 AM, Eran wrote:
> Our app's resize service sometimes sets the height of the
> details band to 0, before it resizes a datawindow. This
> makes the resize much faster, but it has a side effect: If
> the user has typed anything into the datawindow, and that
> datawindow is then resized, the data the user has entered
> will be cleared.
>
> I'm looking for a way to quickly export the newly entered
> data before the resize, and import it back afterwards. This
> is not such a hard task in general, but I'd like it to be
> done as quickly as possible, in order not to stall the
> resize.
>
> Bonus question - is there any immediate way to tell if a
> user has changed the content of a dw? The check should be
> made from within a generic resize service, so I can't add
> any code to the dw's events.
0
Roland
12/29/2010 7:00:07 PM
OK, I feel like I am about to ask a really dumb question but - why would 
your resize cause the data in the buffer to be lost?

Chris Craft

"Roland Smith [TeamSybase]" <rsmith_at_trusthss_dot_com> wrote in message 
news:4d1b8537@forums-1-dub...
> You should be fixing the root problem. Instead of setting the band height 
> to zero, call SetRedraw(False).
>
> On 12/29/2010 2:10 AM, Eran wrote:
>> Our app's resize service sometimes sets the height of the
>> details band to 0, before it resizes a datawindow. This
>> makes the resize much faster, but it has a side effect: If
>> the user has typed anything into the datawindow, and that
>> datawindow is then resized, the data the user has entered
>> will be cleared.
>>
>> I'm looking for a way to quickly export the newly entered
>> data before the resize, and import it back afterwards. This
>> is not such a hard task in general, but I'd like it to be
>> done as quickly as possible, in order not to stall the
>> resize.
>>
>> Bonus question - is there any immediate way to tell if a
>> user has changed the content of a dw? The check should be
>> made from within a generic resize service, so I can't add
>> any code to the dw's events. 


0
Chris
12/29/2010 9:13:47 PM
I think what he said was that making the detail band height=0 caused 
data in an input column to disappear.

On 12/29/2010 4:13 PM, Chris Craft wrote:
> OK, I feel like I am about to ask a really dumb question but - why would
> your resize cause the data in the buffer to be lost?
>
> Chris Craft
>
> "Roland Smith [TeamSybase]"<rsmith_at_trusthss_dot_com>  wrote in message
> news:4d1b8537@forums-1-dub...
>> You should be fixing the root problem. Instead of setting the band height
>> to zero, call SetRedraw(False).
>>
>> On 12/29/2010 2:10 AM, Eran wrote:
>>> Our app's resize service sometimes sets the height of the
>>> details band to 0, before it resizes a datawindow. This
>>> makes the resize much faster, but it has a side effect: If
>>> the user has typed anything into the datawindow, and that
>>> datawindow is then resized, the data the user has entered
>>> will be cleared.
>>>
>>> I'm looking for a way to quickly export the newly entered
>>> data before the resize, and import it back afterwards. This
>>> is not such a hard task in general, but I'd like it to be
>>> done as quickly as possible, in order not to stall the
>>> resize.
>>>
>>> Bonus question - is there any immediate way to tell if a
>>> user has changed the content of a dw? The check should be
>>> made from within a generic resize service, so I can't add
>>> any code to the dw's events.
>
0
Roland
12/30/2010 7:33:20 PM
Hi Eran;

  I would keep the primary data in a DataStore and use ShareData ( ) method 
to the DW control. If you perform an AcceptText ( ) in the Resize event the 
latest changed data will be in the DS. Now turn the shared data off, resize 
and Share the data back on and the performance should be like lightening. 
ShareData does NOT copy or move any rows.  :-)

In the ItemChanged event, set an instance boolean variable (like 
ib_data_changed) to TRUE. Then check this on the Resize. If the Resize does 
an AcceptText ( ) first, the boolean variable will always be set correctly.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Eran" wrote in message news:4d1adeda.5d67.1681692777@sybase.com...

Our app's resize service sometimes sets the height of the
details band to 0, before it resizes a datawindow. This
makes the resize much faster, but it has a side effect: If
the user has typed anything into the datawindow, and that
datawindow is then resized, the data the user has entered
will be cleared.

I'm looking for a way to quickly export the newly entered
data before the resize, and import it back afterwards. This
is not such a hard task in general, but I'd like it to be
done as quickly as possible, in order not to stall the
resize.

Bonus question - is there any immediate way to tell if a
user has changed the content of a dw? The check should be
made from within a generic resize service, so I can't add
any code to the dw's events. 

0
Chris
12/31/2010 12:45:27 AM
Reply:

Similar Artilces:

what's the best way to save data if it's 2 webforms/pages data?
I am working on the web application for recruiting, I split the application for employment into 2 web forms.  After user compeleted the first web form, he has to click "continue" to go to 2nd page and fill out the application, then click "Submit" to save data and send out application by fax. The question is : what is the appropriate way to save data?  when user click "continue" on first page, should I save it on this stage or what should I do?  because I am thinking that if user didn't submit the form but just exit the page, then how can I roll back all the data that I just s...

Using 6.5 DW's in 7's HTML and ActiveX DataWindows
PB 7 has the new HTML DataWindow and the ActiveX DataWindow. Both just read PBD's to extract a specific datawindow to process. Question: Can these new facilites read PB 6.5 datawindows? This would be nice to ease transition. We can still develop DW's in 6.5 until we thing 7.0 is stable and we can distribute to our developers. Don Weimann 1. No, it won't read PB7 datawindows. HTMLDW is implemented by adding properties to the datawindow object. 2. PB7 is, AFAIK, rather stable. I've invested a great deal of time to ensure that it, and in particular, the HTM...

What's an easiest way to import an Exel file to a DW?
This is a multi-part message in MIME format. ------=_NextPart_000_0052_01BF951A.45FDC310 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Currently, I have to convert the selected Excel file to a text file = format before I can import it to a datawindow. Is it a better way? Thanks ------=_NextPart_000_0052_01BF951A.45FDC310 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML>&...

The value's length for key 'data source' exceeds it's limit of '128'.
Hii, When I tried to bind dropdownlist to database by declaring connection string in the code behind file I am getting this error: The value's length for key 'data source' exceeds it's limit of '128'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: The value's length for key 'data source' exceeds it's limit of '128'.Source Error: An...

is it possible write cloumn's data and checkbox's data in the same time?
  I'm editing a asp.net web by using vs 2005 c#, I've a webForm including a gridview and a checkboxlist, the checkbotlist is for authentication selecting of grideview's data. I'm wondering is it possible write gridview and checkboxlist' data in tha same time? if it's possible howcome?     sorry for my poor english.. the expression maybe is not very good to understanding.. hope anyone here could to me a favor to resolve this question.   thank you very much  and have a nice day ! Hi,    It is impossible to write GridView and CheckBoxList at the th...

data view's filter vs. data adapter's SELECT command
doing objectDataSet.Tables["TableA"].DefaultView.RowFilter = "TableA_ID=" + dropDownListControl.SelectedItem.Value.ToString(); or objectDataAdapter.SelectCommand.CommandText = "SELECT * FROM TableA " + " WHERE TableA_ID =" + dropDownListControl.SelectedItem.Value.ToString(); i thought both statements should represent the same thing, but the second one gave me a System.NullReferenceException: Object reference not set to an instance of an object error - would be possible just with those pieces of code ...

It's the fastest ''firefox'' i've ever had!!!:)
Name: Blagovest Email: blago_944atabvdotbg Product: Firefox Summary: It's the fastest ''firefox'' i've ever had!!!:) Comments: I's a great product!I'm really amazed! Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1) Gecko/20081007 Firefox/3.1b1 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

dddw's on html dw's
I'm having an 'irrating' problem in creating an html dw that contains 2 dddw's. Whats supposed to happen is that when the html dw is invoked, it is passed 2 arguments that are used to specify who the user is - company number and user number. Based upon these arguments, the first dddw is supposed to populate a list of available selections based upon entries in a secondary table - company # and user # are contained in the secondary table that the dddw accesses. Based upon the user's selection from the primary dddw, the second dddw is supposed to be populated with the...

dddw's on html dw's
I have an html dw that has a dddw control on it. The purpose of this dddw is to provide the user the ability to select 'vendors' that are relative to the 'vendor item' the user is trying to add to the database. In order for this to work correctly, the dddw must have retrieval arguments set that only pull the vendors that are relative to that user - client # and store #. Both of these fields exist on the vendor table - which populates the dddw - and the vendor item table - which is what the user is updating. My problem is that I cannot seem to establish a link between ...

dddw's on html dw's
HELP!! We've run into a MAJOR problem with using dddw's on html dw's that require retrieval arguments. The html dw's use variables that are set based upon the user logon which are the exact same variables that are needed as the retrieval arguments for the dddw's. We haven't been able to find a way to pass these arguments within the html dw to the dddw control either through the use of session variables or linked arguments. If anyone has an example of how this is done or a suggestion on how to accomplish this I'd be forever grateful. TIA Brad ...

Where There's Data Stored, There's A Risk
"BUSINESSES THROUGHOUT THE REGION THAT handle large amounts of personal information have found one sure-fire way of avoiding security breaches: collect less data."... <http://www.theday.com/re.aspx?re=f34df362-157f-43fd-a990-77ba17fa54b9> or http://preview.tinyurl.com/253a5y -- js http://justheadlines.awardspace.com ...

Insert's with apostrophe's in data.
Is there any way of inserting strings with apostrophe's in them into character fields without doubling up the apostrophe's? For example: insert into mytable ( charfield1 ) values ('don't blow up on me') blows up because of the apostrophe being treated as the string terminator. It works when I do: insert into mytable ( charfield1 ) values ('don''t blow up on me') (that is two single-quotes, not one double-quote). Is there any other alternative, such as an alternate string delimiter? I can't SET quoted_identifier OFF because some of...

Using dddw's on html dw's
I've posted this to the powerbuilder.datawindow forum but was not quite sure if that was the correct forum. Here's the problem: I've created an html dw that uses 2 dddw's. It is invoked by the passing of 2 arguments that are passed when then user signs on to the system. These arguments are captured in the DynaScript of the html page via the session variable. Here are the questions: (1) How do I pass the initial arguments - company # and user # - to the primary dddw so that only those records on the table that the dddw is using are available and (2) when the use...

Two DB's & DW's
Hi I have connections with to DB's. One with the SQLCA-Transaction object and another one with a user-created one "gtr_sqlca". I have datawindows in the application for both DB's. But all the datawindows try to retrieve the data from SQLCA. How can I tell PB that some DW's have to retrieve data from "gtr_sqlca"? Thank you very much Best regards Andreas did you call the settransobject function in the open event of the window? ex. dw_1.SetTransObject(gtr_sqlca) Andreas Keiser wrote: > Hi > > I have connections with to DB...

Web resources about - What's the fastest way to export and import DW data? - sybase.powerbuilder.datawindow

Resources last updated: 12/4/2015 9:15:42 PM