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
626 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Eclipse insufficient memory error 3 102
Doxygen plugin for Android Studio 1 506
VS can't find System.IO.Packaging 5 465
Eclipse IDE - Cannot copy/paste from console output 8 132
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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…
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 synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

895 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now