Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I implement this ?If yes how?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
We usually use user interface wherein we ADD,DELETE,MODIFY contents of the existing/new data one by one each time the user clicks the events .This is a good method to use when we do not want the user to see the database .In this case the user needs to click ADD/MODIFY/DELETE button(event) each time he/she wants to enter data .
BUT in case we want the user to add tons of data and want him to upload the contents of the data on to the database ,then we need to make him/her write all the data on to a EXCEL,MSFLEXGRID and then ADD/DELETE/MODIFY the existing /new contents .

My query is how will we know what data the user deleted or modified to the already existing data ??
Anybody has an idea how to implement this ?I'm clueless..
If you just say do this ,do that ...I can find out ...
Please respond .

Thanks .

 
Hi,
I too couldn't find the exact way to do what u said. Still I will give u a sugession. If u use excel to collect data records. If u want to identify the records that are deleted or modified u can set that excel file Tools menu--> Track Changes--> highlight changes. Now the deletions will come with red underlined and insertions will come with strike thru. I don't have time to do and guide u. Try with this clue.
All the best.
Vijay V.Vijay
Chimera technologies
Blr
 
Presumably on your Save (click) event you collect your data into a recordset and do a SQL DELETE and/or a SQL UPDATE query.

If you want to log all changes add you own transaction table to the database, use the same recordset and do a ADO AddNew and Update to your Transaction table in the database Let me know if this helps

Check out FAQ222-2244
'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Hi,
If you have a primary key and use MS FlexGrid, then you could try the following suggestion:

For each row in MSFlexGrid
Get the primary key for that record
Check the database to see if a record for that key exists
if record exists then
Edit the record and update it with current contents
else
Add a new record and enter contents
endif
Next row in MSFlexGrid

I don't know if it will help you but hope it helps in some way. Let me know what happens.
With regards,
PGK
 
Oh well - off the well worn oath again. If you use Ms. A. to hold the data, and you are adding 'lots' of new data via key-stroke processes, the add function which you currently use to track the NEW should be quite appropiate. If there is some 'qualm' re the needing to "click the button" each time, you coud make a minor mod to the process, and have the record added when all of the (required) fields are complete and have the form stay in the data entry mode. An altrenative would be to add the "hot key" tot he add button, which at least keeps the fingers on the keyboard.

If you are adding from a reasonably reliable data source and are attempting to avoid the key strokes, you shouls add a field in the import processes and fill it with the users Id.

On a slightly different note, I would reccomend NOT storing the entire recored for the audit trail, but only the changes. You only really need the date/time; userid; fieldname; and OldValue (although some prefer to inclued NewValue). Works quite well for edits. For additions; the OldValue is just set to "New", Deletions can just use "Del" in the OldValue.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top