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
650 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
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 column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

628 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