Solved

How do I detect a change to a blob datawindow column using the db ole in powerbuilder 10

Posted on 2009-07-08
6
633 Views
Last Modified: 2013-12-26
I am trying to give the user a way to save multiple form types from a single source i.e. word doc, excel, powerpoint. I can open up the various applications and save and retrieve the information. My problem is how do I detect a change to the document so I don't have to prompt the user to save when nothing has changed. I used get changes, compared get full state blob legnths but none of this is effective.
Thanks
LW
0
Comment
Question by:lwski
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
IncisiveOne earned 250 total points
ID: 24810417
Easy.  What you need is a checksum function.  Exec checksum on all the bytes in the entire blob, this will produce one 32 bit value; do the checksum again at the end; compare the two checksums; if they are the same, the doc is unchanged.

I have not coded in PB for a few years, I do not recall if it has a checksum function.  PB 10 was not around then, it may have.  Otherwise you have to see if you can find a class object that someone has written and published.  Or write your own (that's not too difficult, but it will take time; search the web and find out how it is done).

Cheers

0
 
LVL 18

Expert Comment

by:diasroshan
ID: 24811332
0
 
LVL 6

Expert Comment

by:IncisiveOne
ID: 24813994
Storing both images in a db, and comparing them would be very slow and resource intensive, compared with calculating a checksum in pure memory.
0
 
LVL 4

Assisted Solution

by:Lordain
Lordain earned 250 total points
ID: 24914812
Another possible solution concept is to put a trigger on the database to update a timestamp column whenever your blob column is updated.  Then you just have to check if the timestamp has changed then you know something was updated.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question